summaryrefslogtreecommitdiff
blob: 992917bc7c2154f175c331c3f409ced82587d288 (plain)
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
--- mysql-ruby-2.8/test.rb.0	2008-06-17 07:36:44.000000000 +0200
+++ mysql-ruby-2.8/test.rb	2008-09-11 20:42:19.000000000 +0200
@@ -1,12 +1,17 @@
-#!/usr/local/bin/ruby
+#!/usr/bin/env ruby
 # $Id: mysql-ruby-2.8-test.patch,v 1.1 2008/12/30 11:54:04 graaff Exp $
 
 require "test/unit"
-require "./mysql.o"
+require "mysql"
+
+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
@@ -95,7 +100,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
@@ -211,7 +216,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
@@ -411,7 +416,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
@@ -441,7 +446,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