From djberg96 at gmail.com Mon Nov 2 07:33:52 2009 From: djberg96 at gmail.com (Daniel Berger) Date: Mon, 02 Nov 2009 05:33:52 -0700 Subject: [test-unit-users-en:00009] Question on console runner Message-ID: <4AEED1B0.4020304@gmail.com> Hi, In the Ruby distro (1.8.6-p368) there's a file called runner.rb. It looks like this: # runner.rb require 'test/unit' rcsid = %w$Id: runner.rb 11708 2007-02-12 23:01:19Z shyouhei $ Version = rcsid[2].scan(/\d+/).collect!(&method(:Integer)).freeze Release = rcsid[3].freeze exit Test::Unit::AutoRunner.run(true, File.dirname($0)) In the common.mk task I've setup a custom target like so: TESTSDIR_ARRAY = $(srcdir)/test/core/Array test-array: $(RUNRUBY) "$(srcdir)/test/runner.rb" --basedir="$(TESTSDIR_ARRAY)" --runner=$(TESTUI) $(TESTS) And I've created some custom array test cases under the test/core/Array directory. However, when I try to replace the old test-unit code with the test-unit 2.x code I just get this: ./miniruby ./runruby.rb --extout=.ext -- "./test/runner.rb" --basedir="./test/core/Array" --runner=console make: *** [test-array] Error 1 It doesn't seem to actually run. What am I missing? I tried to view the documentation for Test::Unit::AutoRunner.run, but there doesn't seem to be any. Any chance you could update that? Regards, Dan From kou at cozmixng.org Mon Nov 2 20:00:04 2009 From: kou at cozmixng.org (Kouhei Sutou) Date: Tue, 03 Nov 2009 10:00:04 +0900 (JST) Subject: [test-unit-users-en:00010] Re: Question on console runner In-Reply-To: <4AEED1B0.4020304@gmail.com> References: <4AEED1B0.4020304@gmail.com> Message-ID: <20091103.100004.938753265531810164.kou@cozmixng.org> Hi, In <4AEED1B0.4020304 at gmail.com> "[test-unit-users-en:00009] Question on console runner" on Mon, 02 Nov 2009 05:33:52 -0700, Daniel Berger wrote: > In the Ruby distro (1.8.6-p368) there's a file called > runner.rb. It looks like this: > > # runner.rb > require 'test/unit' > > rcsid = %w$Id: runner.rb 11708 2007-02-12 23:01:19Z shyouhei > $ > Version = > rcsid[2].scan(/\d+/).collect!(&method(:Integer)).freeze > Release = rcsid[3].freeze > > exit Test::Unit::AutoRunner.run(true, File.dirname($0)) > > In the common.mk task I've setup a custom target like so: > > TESTSDIR_ARRAY = $(srcdir)/test/core/Array > > test-array: > $(RUNRUBY) "$(srcdir)/test/runner.rb" > --basedir="$(TESTSDIR_ARRAY)" --runner=$(TESTUI) $(TESTS) > > And I've created some custom array test cases under the > test/core/Array directory. > > However, when I try to replace the old test-unit code with > the test-unit 2.x code I just get this: > > ./miniruby ./runruby.rb --extout=.ext -- "./test/runner.rb" > --basedir="./test/core/Array" --runner=console > make: *** [test-array] Error 1 > > It doesn't seem to actually run. What am I missing? This was a bug of test-unit 2.x... I've fixed this in trunk. > I tried to view the documentation for > Test::Unit::AutoRunner.run, but there doesn't seem to be > any. Any chance you could update that? I will update that... but it's not high priority... Sorry... A patch is welcome! :) Thanks, -- kou From andrew.j.grimm at gmail.com Sat Nov 7 22:28:15 2009 From: andrew.j.grimm at gmail.com (Andrew Grimm) Date: Sun, 8 Nov 2009 14:28:15 +1100 Subject: [test-unit-users-en:00011] Documentation for run methods Message-ID: In Test::Unit, the documentation for Test::Unit.run= says "# If set to false Test::Unit will not automatically run at exit.", and for run? says "# Automatically run tests at exit?" However, I'm finding that if I set Test::Unit.run = false then the unit test is automatically run at exit, whereas if I set Test::Unit.run = true then the unit test is not automatically run. Both scenarios can be seen at http://gist.github.com/229074 This seems to be the opposite of what the documentation says. Have I misunderstood the documentation? Thanks, Andrew From kou at cozmixng.org Sat Nov 7 22:41:23 2009 From: kou at cozmixng.org (Kouhei Sutou) Date: Sun, 08 Nov 2009 12:41:23 +0900 (JST) Subject: [test-unit-users-en:00012] Re: Documentation for run methods In-Reply-To: References: Message-ID: <20091108.124123.133520280546678408.kou@cozmixng.org> Hi, In "[test-unit-users-en:00011] Documentation for run methods" on Sun, 8 Nov 2009 14:28:15 +1100, Andrew Grimm wrote: > In Test::Unit, the documentation for Test::Unit.run= says "# If set to > false Test::Unit will not automatically run at exit.", and for run? > says "# Automatically run tests at exit?" > > However, I'm finding that if I set > > Test::Unit.run = false > > then the unit test is automatically run at exit, whereas if I set > > Test::Unit.run = true > > then the unit test is not automatically run. Both scenarios can be > seen at http://gist.github.com/229074 > > This seems to be the opposite of what the documentation says. Have I > misunderstood the documentation? Thanks for your report. The documentation is wrong. I've fixed it in trunk. Thanks, -- kou From andrew.j.grimm at gmail.com Sat Nov 7 22:47:54 2009 From: andrew.j.grimm at gmail.com (Andrew Grimm) Date: Sun, 8 Nov 2009 14:47:54 +1100 Subject: [test-unit-users-en:00013] Re: Documentation for run methods In-Reply-To: <20091108.124123.133520280546678408.kou@cozmixng.org> References: <20091108.124123.133520280546678408.kou@cozmixng.org> Message-ID: Hi Kou, Thanks for crediting me in the README. The documentation for Test::Unit.run? also needs to be fixed. Thanks, Andrew On Sun, Nov 8, 2009 at 2:41 PM, Kouhei Sutou wrote: > Hi, > > In > ?"[test-unit-users-en:00011] Documentation for run methods" on Sun, 8 Nov 2009 14:28:15 +1100, > ?Andrew Grimm wrote: > >> In Test::Unit, the documentation for Test::Unit.run= says "# If set to >> false Test::Unit will not automatically run at exit.", and for run? >> says "# Automatically run tests at exit?" >> >> However, I'm finding that if I set >> >> Test::Unit.run = false >> >> then the unit test is automatically run at exit, whereas if I set >> >> Test::Unit.run = true >> >> then the unit test is not automatically run. Both scenarios can be >> seen at http://gist.github.com/229074 >> >> This seems to be the opposite of what the documentation says. Have I >> misunderstood the documentation? > > Thanks for your report. > The documentation is wrong. I've fixed it in trunk. > > Thanks, > -- > kou > _______________________________________________ > test-unit-users-en mailing list > test-unit-users-en at rubyforge.org > http://rubyforge.org/mailman/listinfo/test-unit-users-en > From kou at cozmixng.org Sat Nov 7 23:14:14 2009 From: kou at cozmixng.org (Kouhei Sutou) Date: Sun, 08 Nov 2009 13:14:14 +0900 (JST) Subject: [test-unit-users-en:00014] Re: Documentation for run methods In-Reply-To: References: <20091108.124123.133520280546678408.kou@cozmixng.org> Message-ID: <20091108.131414.492256604818688752.kou@cozmixng.org> Hi, In "[test-unit-users-en:00013] Re: Documentation for run methods" on Sun, 8 Nov 2009 14:47:54 +1100, Andrew Grimm wrote: > Thanks for crediting me in the README. You're welcome. :-) > The documentation for Test::Unit.run? also needs to be fixed. Oops. I've also fixed it. Thanks, -- kou From andrew.j.grimm at gmail.com Sat Nov 7 23:52:07 2009 From: andrew.j.grimm at gmail.com (Andrew Grimm) Date: Sun, 8 Nov 2009 15:52:07 +1100 Subject: [test-unit-users-en:00015] Re: Documentation for run methods In-Reply-To: <20091108.131414.492256604818688752.kou@cozmixng.org> References: <20091108.124123.133520280546678408.kou@cozmixng.org> <20091108.131414.492256604818688752.kou@cozmixng.org> Message-ID: Hi Kou, "are run automatically" (or "will be run automatically") is better grammar than "are ran automatically". I'm not sure how to rephrase "Do tests run by hand?" to improve its grammar. Andrew On Sun, Nov 8, 2009 at 3:14 PM, Kouhei Sutou wrote: > Hi, > > In > ?"[test-unit-users-en:00013] Re: Documentation for run methods" on Sun, 8 Nov 2009 14:47:54 +1100, > ?Andrew Grimm wrote: > >> Thanks for crediting me in the README. > > You're welcome. :-) > >> The documentation for Test::Unit.run? also needs to be fixed. > > Oops. I've also fixed it. > > Thanks, > -- > kou > _______________________________________________ > test-unit-users-en mailing list > test-unit-users-en at rubyforge.org > http://rubyforge.org/mailman/listinfo/test-unit-users-en > From kou at cozmixng.org Sun Nov 8 00:31:48 2009 From: kou at cozmixng.org (Kouhei Sutou) Date: Sun, 08 Nov 2009 14:31:48 +0900 (JST) Subject: [test-unit-users-en:00016] Re: Documentation for run methods In-Reply-To: References: <20091108.131414.492256604818688752.kou@cozmixng.org> Message-ID: <20091108.143148.391299521764576857.kou@cozmixng.org> Hi, In "[test-unit-users-en:00015] Re: Documentation for run methods" on Sun, 8 Nov 2009 15:52:07 +1100, Andrew Grimm wrote: > "are run automatically" (or "will be run automatically") is better > grammar than "are ran automatically". Thanks! I'm not good at English... > I'm not sure how to rephrase "Do tests run by hand?" to improve its grammar. Could you provide correct English documentation for Test::Unit.run?? I will replace the current documentation with your suggested documentation. (You doesn't need to reuse my broken documentation.) Thanks, -- kou From andrew.j.grimm at gmail.com Sun Nov 8 01:15:20 2009 From: andrew.j.grimm at gmail.com (Andrew Grimm) Date: Sun, 8 Nov 2009 17:15:20 +1100 Subject: [test-unit-users-en:00017] Re: Documentation for run methods In-Reply-To: <20091108.143148.391299521764576857.kou@cozmixng.org> References: <20091108.131414.492256604818688752.kou@cozmixng.org> <20091108.143148.391299521764576857.kou@cozmixng.org> Message-ID: Hi Kou, It turns out that the documentation has already been changed for ruby 1.8. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/lib/test/unit.rb?r1=24621&r2=24620&pathrev=24621 Here's a slightly re-worded version of what they have. #Set +true+ to indicate that Test::Unit has been run. #If set to +true+, Test::Unit will not automatically run at exit def self.run=(flag) #Tests have already been run? def self.run? Andrew On Sun, Nov 8, 2009 at 4:31 PM, Kouhei Sutou wrote: > Hi, > > In > ?"[test-unit-users-en:00015] Re: Documentation for run methods" on Sun, 8 Nov 2009 15:52:07 +1100, > ?Andrew Grimm wrote: > >> "are run automatically" (or "will be run automatically") is better >> grammar than "are ran automatically". > > Thanks! I'm not good at English... > >> I'm not sure how to rephrase "Do tests run by hand?" to improve its grammar. > > Could you provide correct English documentation for > Test::Unit.run?? I will replace the current documentation > with your suggested documentation. (You doesn't need to > reuse my broken documentation.) > > > Thanks, > -- > kou > _______________________________________________ > test-unit-users-en mailing list > test-unit-users-en at rubyforge.org > http://rubyforge.org/mailman/listinfo/test-unit-users-en > From kou at cozmixng.org Sun Nov 8 09:30:44 2009 From: kou at cozmixng.org (Kouhei Sutou) Date: Sun, 08 Nov 2009 23:30:44 +0900 (JST) Subject: [test-unit-users-en:00018] Re: Documentation for run methods In-Reply-To: References: <20091108.143148.391299521764576857.kou@cozmixng.org> Message-ID: <20091108.233044.242044444498133418.kou@cozmixng.org> Hi, In "[test-unit-users-en:00017] Re: Documentation for run methods" on Sun, 8 Nov 2009 17:15:20 +1100, Andrew Grimm wrote: > It turns out that the documentation has already been changed for ruby > 1.8. http://svn.ruby-lang.org/cgi-bin/viewvc.cgi/branches/ruby_1_8/lib/test/unit.rb?r1=24621&r2=24620&pathrev=24621 > > Here's a slightly re-worded version of what they have. > > #Set +true+ to indicate that Test::Unit has been run. > #If set to +true+, Test::Unit will not automatically run at exit > def self.run=(flag) > > #Tests have already been run? > def self.run? Thanks for the information. I've imported the changes. Thanks, -- kou