1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
|
diff -u mysql-ruby-2.7.3/test.rb mysql-ruby-2.7.3.new/test.rb
--- mysql-ruby-2.7.3/test.rb 2006-12-20 05:31:52.000000000 +0000
+++ mysql-ruby-2.7.3.new/test.rb 2007-04-13 20:55:40.000000000 +0100
@@ -1,16 +1,22 @@
-#!/usr/local/bin/ruby
+#!/usr/bin/env ruby
# $Id: test.rb,v 1.23 2006-12-20 05:31:52 tommy Exp $
require "test/unit"
require "./mysql.o"
+ARGV.each do |a|
+ $argv ||= []
+ $argv << a
+end
+
class TC_Mysql < Test::Unit::TestCase
def setup()
- @host, @user, @pass, db, port, sock, flag = ARGV
+ @host, @user, @pass, db, port, sock, flag = $argv
@db = db || "test"
@port = port.to_i
@sock = sock.nil? || sock.empty? ? nil : sock
@flag = flag.to_i
+
end
def teardown()
end
@@ -95,7 +101,7 @@
class TC_Mysql2 < Test::Unit::TestCase
def setup()
- @host, @user, @pass, db, port, sock, flag = ARGV
+ @host, @user, @pass, db, port, sock, flag = $argv
@db = db || "test"
@port = port.to_i
@sock = sock.nil? || sock.empty? ? nil : sock
@@ -203,7 +209,7 @@
class TC_MysqlRes < Test::Unit::TestCase
def setup()
- @host, @user, @pass, db, port, sock, flag = ARGV
+ @host, @user, @pass, db, port, sock, flag = $argv
@db = db || "test"
@port = port.to_i
@sock = sock.nil? || sock.empty? ? nil : sock
@@ -403,7 +409,7 @@
class TC_MysqlStmt < Test::Unit::TestCase
def setup()
- @host, @user, @pass, db, port, sock, flag = ARGV
+ @host, @user, @pass, db, port, sock, flag = $argv
@db = db || "test"
@port = port.to_i
@sock = sock.nil? || sock.empty? ? nil : sock
@@ -433,7 +439,7 @@
class TC_MysqlStmt2 < Test::Unit::TestCase
def setup()
- @host, @user, @pass, db, port, sock, flag = ARGV
+ @host, @user, @pass, db, port, sock, flag = $argv
@db = db || "test"
@port = port.to_i
@sock = sock.nil? || sock.empty? ? nil : sock
|