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

75 Коммитов

Автор SHA1 Сообщение Дата
naruse 3e92b635fb Add frozen_string_literal: false for all files
When you change this to true, you may need to add more tests.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53141 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-16 05:07:31 +00:00
nobu beb1c085d5 use Timeout.timeout
* time: Object#timeout has been deprecated a long time ago, use
  Timeout.timeout.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51225 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-07-13 10:07:01 +00:00
hsbt c4ee0df8ba * lib/rake/*: Gemify rake [fix GH-862][Feature #11025]
* test/rake/*: ditto.
* tool/rbinstall.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@50163 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-04-04 12:31:31 +00:00
akr fb2008a73a * test/lib/envutil.rb: Moved from test/ruby/.
* test/lib/find_executable.rb: Ditto.

* test/lib/memory_status.rb: Ditto.

* test/lib/test/unit.rb: require envutil.

* test/: Don't require envutil in test files.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48409 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-11-13 16:05:37 +00:00
akr 178bc9a0e7 * test/lib/test/unit.rb: Hide skips by default.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47889 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-10-12 00:24:40 +00:00
akr bf6c098d04 Close pipes.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46258 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-30 14:17:46 +00:00
hsbt f8c6a5dc02 * test/runner.rb: remove dependency test-unit and minitest
from stdlib when running with test-all.
  [Feature #9711][ruby-core:61890]
* test/testunit/*.rb: ditto.
* test/lib: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45970 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-17 06:26:51 +00:00
shirosaki eceff15e68 parallel.rb: fix test-all parallel failure
* lib/test/unit/parallel.rb: fix test-all parallel failure if a test
  is skipped after raise.
  DL::TestFunc#test_sinf is skipped after raise on mingw ruby.
  But it causes Mashal.load failure due to undefined class/module
  DL::DLError when doing test-all parallel and test-all doesn't
  complete. We create new MiniTest::Skip object to avoid Mashal.load
  failure.
  [ruby-core:62133] [Bug #9767]

* test/testunit/test_parallel.rb (TestParallel): add a test.

* test/testunit/tests_for_parallel/ptest_forth.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-05-15 12:31:26 +00:00
usa 5543a55b52 * test: get rid of warnings.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45313 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-03-11 04:22:34 +00:00
hsbt 93156392dd * test/socket/test_addrinfo.rb: remove unused variables.
* test/socket/test_nonblock.rb: ditto.
* test/socket/test_socket.rb: ditto.
* test/socket/test_unix.rb: ditto.
* test/testunit/test_parallel.rb: ditto.
* test/webrick/test_filehandler.rb: ditto.
* test/xmlrpc/test_features.rb: ditto.
* test/zlib/test_zlib.rb: ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@45034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-02-18 12:05:09 +00:00
nobu 689333a0ba test/testunit: reap zombie
* test/testunit/test_hideskip.rb (test_hideskip): reap zombie by
  reading with IO.popen instead of separated spawn and assert.

* test/testunit/test_redefinition.rb (test_redefinition): ditto.

* test/testunit/test_sorting.rb (test_sorting): ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41421 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-06-19 07:47:26 +00:00
naruse 078ffd0ec8 Fix test of parallel test breaked by r40553
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40554 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-05-02 06:07:17 +00:00
usa ba661182a4 * test/testunit/tests_for_parallel/ptest_forth.rb: added a test case
which causes an error.

* test/testunit/test_parallel.rb: follow above change.
  see [Bug #6882]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36746 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-08-21 00:07:32 +00:00
usa 970c5ac4ff * test/testunit/test_redefinition.rb: broken class/method names.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36531 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-25 01:01:59 +00:00
sorah 7773a911f5 * lib/test/unit.rb: warn when test_* method is redefined.
Patch by mame (Yusuke Endoh). [Feature #2643] [ruby-core:27790]

* test/testunit/test_redefinition.rb: Test for above.

* test/testunit/test4test_redefinition.rb: Ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-07-21 05:12:32 +00:00
nobu ff49900ab4 lib/test/unit.rb: format workers results in the parent
* lib/test/unit.rb (Test::Unit::Runner#_run_parallel): format workers
  results in the parent.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-06-15 22:46:08 +00:00
nobu fca2ac964d test/testunit: fix for recent minitest
* test/testunit/test_hideskip.rb (TestHideSkip#test_hideskip):
  MiniTest#puke now reports Skipped messages only if verbose mode.
* test/testunit/test_sorting.rb (TestTestUnitSorting#test_sorting):
  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@35577 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-05-07 18:54:09 +00:00
sorah c0ec3efcae * lib/test/unit.rb (setup_options): add option "--show-skip" to
cancel "--hide-skip" (-q)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34740 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2012-02-22 09:47:24 +00:00
sorah 38ade50140 * test/testunit/test_parallel.rb (test_separate): Test for "--separate"
option (r34121)

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@34122 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-12-25 14:17:28 +00:00
sorah 7e04b19d22 * lib/test/unit.rb (_run_suites): Now reports are written the
following order: Skip, Failure, Error. [Feature #5282]

* test_sorting.rb: test for above.

* test4test_sorting.rb: Ditto.

* lib/test/unit.rb (run): Put RUBY_DESCIPTION before quitting.
  [Feature #5282]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@33205 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-09-06 12:20:17 +00:00
sorah 9864da84f6 * test/testunit/test_parallel.rb: pass "--ruby" option to
test/testunit/tests_for_parallel/runner.rb. [Bug #5132] [ruby-dev:44303]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32812 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-08-02 11:18:58 +00:00
sorah 7506a580fe * lib/test/unit.rb: Add new class variable `@@testfile_prefix`.
This is for changing test name prefix. (For testing)

* test/testunit/tests_for_parallel/ptest_first.rb: Renamed from
  test_first.rb

* test/testunit/tests_for_parallel/ptest_second.rb: Renamed from
  test_second.rb

* test/testunit/tests_for_parallel/ptest_third.rb: Renamed from
  test_third.rb

* test/testunit/tests_for_parallel/ptest_forth.rb: Renamed from
  test_forth.rb

* test/testunit/tests_for_parallel/runner.rb: Remove misc.rb

* test/testunit/tests_for_parallel/ptest_first.rb: ditto.

* test/testunit/tests_for_parallel/ptest_second.rb: ditto.

* test/testunit/tests_for_parallel/ptest_third.rb: ditto.

* test/testunit/tests_for_parallel/ptest_forth.rb: ditto.

* test/testunit/tests_for_parallel/misc.rb: Removed because no longer
  needed.

* test/testunit/test_parallel.rb: Fix assertions for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32496 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-10 12:19:16 +00:00
usa 1a1c95404f * test/testunit/test_parallel.rb (TestParallelWorker#teardown): wait
the child process even if the communition pipe is broken.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32436 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-07-07 08:56:12 +00:00
sorah 288c18cdd8 * test/testunit/test_parallel.rb: Fix Regexp for test.
* test/testunit/tests_for_parallel/test_third.rb: Use
  Test::Unit::TestCase#on_parallel_worker? for detecting worker.

* lib/test/unit/testcase.rb(Test::Unit::TestCase#on_parallel_worker?):
  New Method Test::Unit::TestCase#on_parallel_worker? returns true
  when a testcase is running on parallel worker.
* lib/test/unit/parallel.rb(Test::Unit::TestCase#on_parallel_worker?):
  ditto.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32123 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-16 11:24:23 +00:00
sorah ea11cf5d7f * test/testunit/test_parallel.rb(test_ignore_tzero): Test for r32109.
* test/testunit/tests_for_parallel/test_third.rb: Use another way to
  detect that test is running on worker. This fixes sometimes
  TestParallel failing.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32110 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-15 23:06:00 +00:00
usa 72e8077957 * test/testunit/test_parallel.rb (TestParallel::TestParallelWorker#
setup): now can run on Windows, probably.

* test/testunit/test_parallel.rb (TestParallel::TestParalle#setup):
  ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32108 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-15 18:09:47 +00:00
naruse a7198a3c73 Ignore exception from Process.kill.
On NetBSD this usually raises Errno::ESRCH.
Of course, the process is already finished and should be ignored.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@32034 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-12 18:20:25 +00:00
nobu c95cbe809e * test/testunit: add skip messages.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31981 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-06-10 04:03:36 +00:00
sorah 64495a2f85 * lib/test/unit.rb: Add option for hiding skip messages when test
ends. #4657

* test/testunit/test_hideskip.rb, test/testunit/test4test_hideskip.rb:
test for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31502 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-05-10 05:53:46 +00:00
nagachika c414d861c1 * test/testunit/test_parallel.rb
(test_should_run_all_without_any_leaks): accomplish r31023.
      [ruby-dev:43300] [Bug #4466]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31043 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-07 05:15:22 +00:00
nagachika 118a5bcf96 * test/testunit/test_parallel.rb
(test_should_run_all_without_any_leaks): consider that the order of
    testcase could change. [ruby-dev:43300] [Bug #4466]

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31023 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-04 14:20:23 +00:00
sorah 888362cc85 * test/testunit/test_parallel.rb(TestParallel#spawn_runner):
Fix outputing empty line in running test.

* test/testunit/tests_for_parallel/test_third.rb: Remove `sleep`

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@31002 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-02 05:06:43 +00:00
sorah 0a9442983d * lib/test/unit/parallel.rb: For Windows.
* test/testunit/test_parallel.rb(TestParallelWorker#test_quit_in_test):
  Fix for above specification change.
* test/testunit/test_parallel.rb(TestParallel#spawn_runner):
  Fix outputing empty line in running test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30999 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-03-01 12:54:39 +00:00
nagachika 667833711b * test/testunit/test_rake_integration.rb (test_with_rake_runner):
use assert_in_out_err for suppress messages.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30988 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-28 14:56:01 +00:00
sorah 18c34c6c92 * test/testunit/test_parallel.rb: Temporally disable test on Windows.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30972 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-28 02:58:35 +00:00
nobu 715dc8355c * lib/test/unit.rb, lib/test/unit/parallel.rb: remove trailing spaces.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30965 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-26 14:51:35 +00:00
sorah 86c7e68442 * lib/test/unit.rb: --jobs-status won't puts over 2 lines.
* test/testunit/test_parallel.rb: Fix test for above.
* lib/test/*: refactoring.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30959 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-26 07:17:59 +00:00
sorah 0695a5aa25 * common.mk: Use $RUNRUBY for worker process.
* lib/test/unit.rb: Fix bug.
* lib/test/unit.rb: @options[:ruby](@opts[:ruby]) is now Array.
* test/testunit/parallel.rb: Fix for above.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30950 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-24 04:47:48 +00:00
sorah e9c22a6f1a * test/testunit/tests_for_parallel/misc.rb: Fix bug in r30947.
* lib/test/unit.rb, lib/test/unit/assertions.rb: For this test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30948 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-24 01:08:51 +00:00
sorah 48fa6ed529 * test/testunit/test_parallel.rb, test/testunit/parallel/*:
Test for r30939.
* lib/test/unit.rb: For test.
* lib/test/parallel.rb: For test.
* lib/test/unit/testcase.rb: For test.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30947 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-23 14:08:25 +00:00
tenderlove c36abbfd43 * lib/test/unit.rb: partial revert of r30849. [ruby-core:32864]
* test/testunit/test_rake_integration.rb: adding an integration test
  with the rake loader to prevent regressions.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30913 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2011-02-18 21:39:09 +00:00
nobu 11caac1663 * lib/test/unit/assertions.rb (Test::Unit::Assertions#assert):
assertion message must be String or Proc.  suggested by caleb
  clausen at [ruby-core:29884].


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-30 15:26:34 +00:00
ryan 3ceca921fc Forgot to remove test/unit tests
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19561 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-25 21:56:30 +00:00
nobu 00b4a3f9c4 * test: assert_raises has been deprecated since a long time ago.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@19536 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-09-24 17:44:39 +00:00
mame 56dda0e605 * test/testunit/collector/test_dir.rb: r15825 made it unnecessary to change
String to Symbol.

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


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@17453 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2008-06-19 18:20:30 +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
akr 923d3ea159 * lib/runit, lib/rubyunit.rb, test/testunit/runit: removed.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@14391 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-12-21 03:56:45 +00:00
ntalbott 25ac9f24fd * test/testunit/collector/test_dir.rb: Fixed test/unit tests that
were breaking due to Module#public_instance_methods now 
  returning a Symbol instead of a String.

* test/testunit/collector/test_objectspace.rb: Ditto.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@12114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-03-20 23:29:49 +00:00
ko1 c5148e0383 * test/testunit/test_testcase.rb: catch up with current instance
variable spec.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11839 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-24 01:49:43 +00:00
ko1 353cd25170 * object.c (rb_obj_ivar_set/get/defined): fix to check :@_v/C id.
* test/testunit/test_testcase.rb: fix to use instance_variable_get()
  to access @_result.



git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@11763 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2007-02-16 12:36:49 +00:00