Граф коммитов

77 Коммитов

Автор SHA1 Сообщение Дата
kou 692ea1bb83 * lib/test/unit/collector/objectspace.rb
(Test::Unit::Collector::ObjectSpace::NAME): fix a typo.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17904 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-06 01:13:20 +00:00
akr 7d166d26a5 * lib/test/unit/testcase.rb: collect decendants of
Test::Unit::TestCase using inherited.

* lib/test/unit/autorunner.rb: don't use ObjectSpace.each_object.

* lib/test/unit/collector/dir.rb: ditto.

* lib/test/unit/collector/objectspace.rb: ditto.

[ruby-core:17126]



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17877 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-04 13:19:24 +00:00
mame 498324c5d3 * lib/test/unit/ui/console/testrunner.rb: prevent destructive modification to $0.
* test/rubygems/gemutilities.rb (build_rake_in): move from test_gem_ext_rake_builder.rb.

* test/rubygems/test_gem_ext_rake_builder.rb: ditto.

* test/rubygems/test_gem_installer.rb: override Gem.ruby and ENV["rake"].

* test/rubygems/test_gem_uninstaller.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17780 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-07-01 12:33:11 +00:00
nobu fce76df67c * lib/test/unit/collector/dir.rb (recursive_collect): r15662 reverted.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-30 13:30:39 +00:00
nobu 4bcf877beb * test/inlinetest.rb (InlineTest.in_progname): workaround for frozen
$0.  [ruby-dev:35261]

* lib/test/unit/ui/console/testrunner.rb (TestRunner#finished): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17612 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-27 12:19:11 +00:00
ryan fa09f2ff02 Applied Laurent's patch to testcase.rb to fix symbol method names
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15825 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-21 19:54:28 +00:00
nobu cce9eb092b * lib/test/unit/collector/dir.rb (recursive_collect): do not always
include all test_*.rb.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15662 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-03-01 08:51:37 +00:00
naruse a10ded3ba0 * bootstraptest/runner.rb, bootstraptest/test_method.rb, enc/depend,
instruby.rb, lib/mkmf.rb, lib/test/unit/util/procwrapper.rb,
mkconfig.rb, sample/test.rb, template/vm.inc.tmpl,
test/ruby/test_stringchar.rb: fixes arround String#gsub.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15443 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-02-12 06:28:23 +00:00
gotoyuzo 5179e8a765 * Fix variable name.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14778 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-28 19:55:04 +00:00
gotoyuzo d356ccc987 * lib/test/unit/assertions.rb (Test::Unit::Assertions#assert_throws):
throw won't raise NameError nor ThreadError but ArgumentError on 1.9.
  (Test::Unit::Assertions#assert_not_throws): ditto.

* test/testunit/test_assertions.rb: add assertions for throwing some
  objects other than Symbol.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14777 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-28 19:47:55 +00:00
matz 4e183b11ac * test/ruby/test_dir.rb (TestDir::setup): ?c now makes a string.
* lib/test/unit/autorunner.rb (Test::Unit::AutoRunner::initialize):
  initialize @workdir to stop warning.

* lib/drb/drb.rb (DRb::DRbServer::InvokeMethod::perform_without_block): 
  replace funcall by send!.  other files in the distribution as well.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13244 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-08-24 09:57:53 +00:00
matz 58c0100a77 * array.c (rb_ary_unshift_m): a bug in lfree shift length
calculation.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11179 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-16 14:35:51 +00:00
nobu 499d04674c * lib/test/unit/collector/dir.rb (Collector::Dir#collect): append base
directory but not prepend.

* lib/test/unit/collector/dir.rb (Collector::Dir#collect_file): do not
  join with dot.  fixed: [ruby-core:09179]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11174 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-14 16:04:16 +00:00
nobu 272560359a * lib/test/unit/collector/dir.rb (Collector::Dir#collect): prepend
base directory to load path.

* lib/test/unit/collector/dir.rb (Collector::Dir#collect_file): should
  use the given File-like interface, but not File directly.

* test/testunit/collector/test_dir.rb (TestDir::FileSystem): implement
  File-like methods correctly.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11147 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-12 17:31:15 +00:00
nobu 27841c008e * lib/test/unit/collector/dir.rb (Test::Unit::Collector::Dir#collect_file):
load expanded path.  fixed: [ruby-dev:29621]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11066 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-02 14:48:44 +00:00
nobu 7d054f8913 * lib/test/unit/autorunner.rb (Test::Unit::AutoRunner::COLLECTORS):
base directory should be lower precedence.  fixed: [ruby-dev:29622]

* lib/test/unit/autorunner.rb (Test::Unit::AutoRunner#options): typo.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11065 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-02 13:29:07 +00:00
nobu 5cfcbb2aca * common.mk (test-all): separate directory where running test cases
from source tree.

* lib/test/unit/autorunner.rb (options): added --basedir, --workdir
  and --load-path options.

* lib/test/unit/collector/dir.rb (recursive_collect, collect_file):
  base directory support.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11062 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-10-01 16:25:37 +00:00
drbrain 7d3fc8ff2b Rescue Exception in Test::Unit::TestCase#run. [ruby-core:08783]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10897 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-09-09 05:14:40 +00:00
drbrain 8bd9d238b7 RDoc for #run= and #run?
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10675 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-04 21:00:31 +00:00
drbrain 52c034aecb Documentation cleanup.
Includes patches by Hugh Sasse:
* ping.rb
* weakref.rb
* mailread.rb


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10668 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-08-04 18:05:50 +00:00
matz 7b48490222 * eval.c (Init_eval): add aliases invoke_method and
invoke_functional_method corresponding send and funcall
  respectively.  [ruby-talk:197512]

* parse.y (parser_yylex): returns the most typical keyword token
  on EXPR_FNAME.  [ruby-core:7995]

* ext/socket/socket.c: protoize.

* parse.y (then): remove ':' from 'then' and 'do' rules.

* hash.c (env_aset): raise TypeError on nil with more descriptive
  message.  [ruby-core:07990]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@10304 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-06-17 14:50:04 +00:00
matz ccf99b9ce6 * eval.c (ev_const_get): simplified using rb_const_get_fallback().
* eval.c (ev_const_defined): adopt to ev_const_get() using
  rb_const_defined_fallback().

* variable.c (rb_const_get_fallback): new function to implement
  constant search.

* variable.c (rb_const_defined_fallback): new function to
  implement constant definition check.

* variable.c (rb_const_get_0): adopt to new behavior.  constants
  are looked up in the order of: current class, super classes (but
  Object), lexically external classes/modules, and Object.

* variable.c (rb_const_defined_0): ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9949 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-02-17 08:40:52 +00:00
nobu 06f4b438fb * lib/test/unit/autorunner.rb (process_args): ignore arguments after
'--' so that test scripts can handle them.  fixed: [ruby-dev:28258]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@9855 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2006-01-22 14:28:02 +00:00
ntalbott f2d29b01cb * lib/test/unit/collector.rb (collect_file): now deletes paths added
to $LOAD_PATH instead of restoring it verbatim.

	* lib/test/unit/autorunner.rb (AutoRunner.run): fixed so that
	  'ruby -rtest/unit -rtest1 -rtest2 -e0' will use the objectspace
	  collector again. Also tried to simplify the calling convention.

	* test/runner.rb: adjusted for new AutoRunner semantics.

	* lib/test/unit.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7990 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2005-02-17 04:50:49 +00:00
nobu 8c299e6e26 * lib/test/unit.rb: use standalone runner for -e.
* lib/test/unit/autorunner.rb (Test::Unit::AutoRunner#options): accept
  multiple -p and -x options.

* lib/test/unit/collector/dir.rb (Test::Unit::Collector::Dir#recursive_collect):
  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7597 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-12-19 02:01:59 +00:00
eban 5913c969f1 * lib/test/unit/collector/dir.rb: typo fix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7323 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-19 15:09:13 +00:00
eban ab55ad1afd * lib/test/unit/collector/dir.rb: better regex.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7322 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-19 15:01:20 +00:00
eban 0fe17f5d81 * lib/test/unit/collector/dir.rb: better support for -p/-x option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7321 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-19 13:45:46 +00:00
eban e6a0f42c94 * lib/test/unit/collector/dir.rb: add support for directory name
with -p/-x options.

* test/testunit/collector/test_dir.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7317 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-19 02:22:57 +00:00
usa c2b7884076 * lib/test/unit/autorunner.rb (Test::Unit::AutoRunner::options): add
new option --exclude (-x) to skip some tests.

* lib/test/unit/collector/dir.rb (Test::Unit::Collector::Dir.exclude):
  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7279 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-16 04:39:22 +00:00
nobu 6116dd832c * lib/test/unit/autorunner.rb (Test::Unit::AutoRunner::options): use
Regexp conversion.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@7277 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-11-16 02:19:44 +00:00
nobu 97a557bdf9 * lib/test/unit/ui/console/testrunner.rb (test_started): restore $0
after changing process title.  [ruby-talk:97426]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6186 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-21 06:56:48 +00:00
nobu 92f0be2037 * dln.c, io.c, pack.c, lib/benchmark.rb, lib/cgi.rb, lib/csv.rb,
lib/date.rb, lib/ftools.rb, lib/getoptlong.rb, lib/logger.rb,
  lib/matrix.rb, lib/monitor.rb, lib/set.rb, lib/thwait.rb,
  lib/timeout.rb, lib/yaml.rb, lib/drb/drb.rb, lib/irb/workspace.rb,
  lib/net/ftp.rb, lib/net/http.rb, lib/net/imap.rb, lib/net/pop.rb,
  lib/net/telnet.rb, lib/racc/parser.rb, lib/rinda/rinda.rb,
  lib/rinda/tuplespace.rb, lib/shell/command-processor.rb,
  lib/soap/rpc/soaplet.rb, lib/test/unit/testcase.rb,
  lib/test/unit/testsuite.rb: typo fix.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6178 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-18 23:19:47 +00:00
nobu fa7a5d5477 * ext/extmk.rb (extmake): skip uncompiled extensions.
* lib/mkmf.rb (create_makefile): emit no rules for static library if
  $static is nil, e.g., outside of ext/.

* lib/test/unit/ui/console/testrunner.rb (test_started): show test
  name via $0.

* runruby.rb: set environments to use the compiled binary.

* test/runner.rb: do nothing while cross-compiling.

* test/drb/drbtest.rb, test/soap/calc/test_calc_cgi.rb: use envutil to
  know ruby binary.

* test/ruby/envutil.rb: give priority to RUBY environment variable to
  use just compiled binary and libraries.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@6125 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-04-08 10:45:21 +00:00
dave 1c1a61a436 Move RDoc comments for Test::Unit
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5887 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-03-04 15:54:39 +00:00
gsinclair 9670d71ba9 From ruby_1_8 branch:
* lib/test/unit.rb: rearranged documentation for RDoc's sake.
 * lib/matrix.rb: improved documentation.
 * lib/net/http.rb: slight documentation formatting improvement.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5599 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-02-01 09:27:17 +00:00
nobu 47c7c5bac6 * lib/test/unit/ui/testrunnerutilities.rb (TestRunnerUtilities):
moved run method which allows output level.  [ruby-dev:22554]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5456 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-13 05:27:24 +00:00
nahi f34ce620a7 * lib/test/unit/collector/dir.rb: do not ignore exceptions(LoadError
and SystemExitError) while loading a testcase.  smell of bug.

        * test/testunit/collector/test_dir.rb: add new test of the LoadError.

        * test/drb/{test_drbssl.rb,test_drbunix.rb}: do not define testcase if
          openssl is not installed.

        * test/testunit/collector/test_dir.rb: assert_raises -> assert_raise.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5423 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-09 04:26:05 +00:00
dave 1b31d09edd Add RDoc to build. Add --ri-system to RDoc
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5382 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2004-01-05 21:48:16 +00:00
nobu 73d77c8f57 * lib/test/unit/assertions.rb: Modules are allowed to rescue.
* lib/test/unit/autorunner.rb: show output_level in order.

* lib/test/unit/collector/dir.rb: get rid of successive same
  directories in load path.

* test/testunit/test_assertions.rb (test_assert_nothing_raised,
  test_assert_raise): test for modules.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5276 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-24 05:08:04 +00:00
ntalbott 1253665ec4 * lib/test/unit/assertions.rb: renamed #assert_raises to #assert_raise
and made the former call the latter. [ruby-core:01890]

	* test/testunit/test_assertions.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-08 15:58:41 +00:00
nobu e67e930462 * lib/test/unit/autorunner.rb: remove dependency to a particular
runner.  [ruby-core:01901], [ruby-list:38869]

* lib/test/unit/ui/testrunnerutilities.rb: moved output level
  constants from Console.

* lib/test/unit/ui/console/testrunner.rb: ditto.

* lib/test/unit/ui/{fox,gtk,gtk2,tk}/testrunner.rb (initialize):
  accept output_level.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5139 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-08 13:48:14 +00:00
nobu 33f0b0ae0b * lib/test/unit/assertions.rb (Test::Unit::Assertions::assert_raises,
Test::Unit::Assertions::assert_nothing_raised): use the last
  argument as message unless non-class object.

* test/testunit/test_assertions.rb (test_assert_raises): test for
  multiple exception list.  [ruby-core:01891]

* test/testunit/test_assertions.rb (test_assert_nothing_raised): test
  for non-exception classes.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-05 14:22:36 +00:00
nobu 01d06638b9 * lib/test/unit/assertions.rb (Test::Unit::Assertions::assert_raises):
allow multiple exception list.  [ruby-core:01884]

* lib/test/unit/assertions.rb (Test::Unit::Assertions::assert_nothing_raised):
  check whether arguments are subclass of Exception.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5112 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-04 17:49:39 +00:00
nobu 953b293f2b * lib/test/unit/ui/gtk2 (Test::Unit::UI::GTK2#start_ui): remove debug statement.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5084 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-02 12:41:01 +00:00
nobu 086745b7d6 * bin/testrb: new test runner. [ruby-core:01845]
* lib/test/unit/autorunner.rb (Test::Unit::AutoRunner.run,
  Test::Unit::AutoRunner#initialize): take test list to run.

* lib/test/unit/autorunner.rb (Test::Unit::AutoRunner::RUNNERS,
  Test::Unit::AutoRunner#run): should not exit inside a library, just
  return the result instead.

* lib/test/unit.rb: ditto.

* test/runner.rb: exit with the test result.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5083 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-02 12:31:44 +00:00
ntalbott 6e4b8e19d7 * lib/test/unit/assertions.rb: fixed #assert_no_match message.
* test/testunit/test_assertions.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-12-01 19:25:51 +00:00
nobu 99fb5f4871 * eval.c (rb_f_exit), process.c (rb_f_exit_bang): treat true as
success, false as failure.  [ruby-dev:22067]

* eval.c (rb_f_abort, rb_thread_switch), process.c (rb_f_system): use
  ANSI macro instead of hard coded value.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5040 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-27 15:34:53 +00:00
ntalbott 0125719694 * lib/test/unit/util/backtracefilter.rb: fixed a bug that occurred
when an exception had no backtrace.

	* test/testunit/util/test_backtracefilter.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@5001 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-21 22:36:13 +00:00
ntalbott b31aeea632 * lib/test/unit/assertions.rb: use #__send__ instead of #send.
* lib/test/unit/testcase.rb: ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@4995 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2003-11-20 15:45:56 +00:00