--- mysql-ruby-2.8.1/test.rb.0 2008-06-17 07:36:44.000000000 +0200 +++ mysql-ruby-2.8.1/test.rb 2008-09-11 20:42:19.000000000 +0200 @@ -1,12 +1,17 @@ -#!/usr/local/bin/ruby +#!/usr/bin/env ruby # $Id: test.rb 244 2009-02-01 08:43:39Z tommy $ 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