Hi,

At Fri, 31 Dec 2004 04:08:47 +0900,
Jim Weirich wrote in [ruby-talk:124849]:
> testrb doesn't take a -I flag and I wanted to avoid locating testrb in the
> file system to pass to the Ruby command, but then I remembered the -S
> flag.

I did want lib/test/unit.rb to be equal to test/runner.rb, but
it seems weird.

Anyway, testrb would better to take -I flags.


Index: lib/test/unit.rb =================================================================== RCS file: /cvs/ruby/src/ruby/lib/test/unit.rb,v retrieving revision 1.11 diff -U2 -p -r1.11 unit.rb --- lib/test/unit.rb 19 Dec 2004 02:01:38 -0000 1.11 +++ lib/test/unit.rb 3 Jan 2005 02:03:28 -0000 @@ -274,5 +274,5 @@ end at_exit do unless $! || Test::Unit.run? - exit Test::Unit::AutoRunner.run($0 != "-e" && $0) + exit Test::Unit::AutoRunner.run($0) end end Index: lib/test/unit/autorunner.rb =================================================================== RCS file: /cvs/ruby/src/ruby/lib/test/unit/autorunner.rb,v retrieving revision 1.11 diff -U2 -p -r1.11 autorunner.rb --- lib/test/unit/autorunner.rb 19 Dec 2004 02:01:39 -0000 1.11 +++ lib/test/unit/autorunner.rb 3 Jan 2005 02:14:02 -0000 @@ -148,4 +148,9 @@ module Test end + o.on('-I', "--load-path=DIR[#{File::PATH_SEPARATOR}DIR...]", + "Appends directory list to $LOAD_PATH.") do |dirs| + $LOAD_PATH.concat(dirs.split(File::PATH_SEPARATOR)) + end + o.on('-v', '--verbose=[LEVEL]', OUTPUT_LEVELS, "Set the output level (default is verbose).",
-- Nobu Nakada