~ubuntu-branches/ubuntu/trusty/libodbc-ruby/trusty

« back to all changes in this revision

Viewing changes to utf8/test.rb

  • Committer: Bazaar Package Importer
  • Author(s): Daigo Moriwaki, Lucas Nussbaum
  • Date: 2010-05-07 16:50:04 UTC
  • mfrom: (1.1.9 upstream)
  • Revision ID: james.westby@ubuntu.com-20100507165004-so71tlp4aaqvwa69
Tags: 0.99991-1
* New upstream release
* Switch to dpkg-source 3.0 (quilt) format
  + Added debian/source
* Bumped Standard Version to 3.8.4
* Updated debian/patches
  + Added quilt patch, removed dpatch
    because upstream has new directory structure
* Updated .example. no test.rb is available with new release
* Updated debian/control
  + Added Build-Depends for ruby1.9.1
  + Removed dpatch from Build-Depends
  + Added myself to Uploaders
* Updated debian/rules
  + Port to ruby1.9.1 (Closes: #507695)
  + Changed the directory structure for make
  + Removed dpatch.mk

[ Lucas Nussbaum ]
* Fixed Vcs-* fields after pkg-ruby-extras SVN layout change.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# $Id: test.rb,v 1.2 2004/11/17 07:40:03 chw Exp chw $
2
 
#
3
 
# Execute in ruby-odbc utf8 directory.
4
 
#
5
 
#  ruby test.rb "mysql-DSN" "mysql-user" "mysql-password"
6
 
#
7
 
# Test creates and deletes table "test" in that DSN.
8
 
 
9
 
require './odbc_utf8'
10
 
 
11
 
$dsn = ARGV.shift
12
 
$uid = ARGV.shift
13
 
$pwd = ARGV.shift
14
 
 
15
 
begin
16
 
  Dir.glob("../test/[0-9]*.rb").sort.each do |f|
17
 
    f =~ /^..\/test\/\d+(.*)\.rb$/
18
 
    print $1 + "."*(20-$1.length)
19
 
    $stdout.flush
20
 
    load f
21
 
    print "ok\n"
22
 
  end
23
 
ensure
24
 
  begin
25
 
    $c.drop_all unless $c.class != ODBC::Database
26
 
  rescue
27
 
  end
28
 
  begin
29
 
    ODBC.connect($dsn, $uid, $pwd).do("drop table test")
30
 
  rescue
31
 
  end
32
 
end