summaryrefslogtreecommitdiff
path: root/test/lib
AgeCommit message (Collapse)Author
2016-12-24test/unit.rb: restore parallel optionnobu
* test/lib/test/unit.rb (_run_parallel): restore parallel option after retrying for --repeat-count option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57169 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-24test/unit.rb: --subprocess-timeout-scale optionnobu
* test/lib/envutil.rb (EnvUtil#invoke_ruby): add subprocess timeout scaling factor. * test/lib/test/unit.rb (Test::Unit::SubprocessOption): add --subprocess-timeout-scale option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57168 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-24test/unit.rb: --repeat-count optionnobu
* test/lib/test/unit.rb (Test::Unit::RepeatOption): --repeat-count option to repeat COUNT times while success. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57167 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-23assertions.rb: prepare_syntax_checknobu
* test/lib/test/unit/assertions.rb (prepare_syntax_check): extract common preparation of arguments from assert_valid_syntax and assert_syntax_error. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57159 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-23assertions.rb: syntax check by iseqnobu
* test/lib/test/unit/assertions.rb (assert_valid_syntax): use RubyVM::InstructionSequence.compile to get rid of executing the code, instead of catch&throw. sample/trick2015/kinaba/entry.rb no longer raises an Invalid return. * test/lib/test/unit/assertions.rb (assert_syntax_error): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57158 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-20test/unit.rb: separator [ci skip]nobu
* test/lib/test/unit.rb (ExcludesOption#setup_options): add separator for --excludes-dir in help message. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57116 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-08test/unit.rb: fix -n optionnobu
* test/lib/test/unit.rb (non_options): turn name patterns into Regexps. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57026 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-07assertions.rb: defered message in FailDescnobu
* test/lib/test/unit/assertions.rb (FailDesc): allow to defer message generation, as well as other assertion methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57016 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-12-05Remove closed checks and use `&.`kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56987 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-11-02assertions.rb: assert_all_assertionsnobu
* test/lib/test/unit/assertions.rb (assert_all_assertions): prefix assert to be filtered out. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56546 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-28test/unit.rb: no file name if idle [ci skip]nobu
* test/lib/test/unit.rb (Test::Unit::Parallel::Worker#to_s): show file name if not idling. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56517 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-24test/unit.rb: show idling workersnobu
* test/lib/test/unit.rb (Test::Unit::Parallel#deal): update the job status after a task finished, to show idling workers. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56484 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-10-08memory_status.c: system callnobu
* ext/-test-/memory_status/memory_status.c: get memory sizes by mach task_info system call. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56376 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-09-27assertions.rb: success optionnobu
* test/lib/test/unit/assertions.rb (assert_in_out_err): add success option to check the exit status. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56267 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-30Use qualified namesnobu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56037 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-29assertions.rb: add an alias pend for skiprhe
* test/lib/test/unit/assertions.rb (pend): Add an alias 'pend' for 'skip'. This is required for test-unit compatibility. In particular, ext/openssl uses it. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56025 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-08-08test/unit.rb: no verbose in worker processesnobu
* test/lib/test/unit.rb (Test::Unit::Parallel::Worker.launch): disable verbose flag in worker processes, get rid of unexpected output within marshaled results. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55832 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-07-13* test/lib/test/unit.rb: added test files with `_test` suffix for jsonhsbt
upstream. * test/json: merge original test files from json upstream. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55667 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-22-test-/integernobu
* ext/-test-/integer/core_ext.c: move testutil/integer.c. * test/lib/-test-/integer.rb: extract implementation details from test/unit/assertions.rb. [Bug #12408] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55114 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-19assertions.rb: leave timeout to invoke_rubynobu
* test/lib/test/unit/assertions.rb (assert_separately): leave timeout to invoke_ruby, which handles outputs and status of the target process since r51539. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55070 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-17[Feature #12005] Unify Fixnum and Bignum into Integerakr
* [Feature #12005] Unify Fixnum and Bignum into Integer * include/ruby/ruby.h (rb_class_of): Return rb_cInteger for fixnums. * insns.def (INTEGER_REDEFINED_OP_FLAG): Unified from FIXNUM_REDEFINED_OP_FLAG and BIGNUM_REDEFINED_OP_FLAG. * vm_core.h: Ditto. * vm_insnhelper.c (opt_eq_func): Use INTEGER_REDEFINED_OP_FLAG instead of FIXNUM_REDEFINED_OP_FLAG. * vm.c (vm_redefinition_check_flag): Use rb_cInteger instead of rb_cFixnum and rb_cBignum. (C): Use Integer instead of Fixnum and Bignum. * numeric.c (fix_succ): Removed. (Init_Numeric): Define Fixnum as Integer. * bignum.c (bignew): Use rb_cInteger instead of Rb_cBignum. (rb_int_coerce): replaced from rb_big_coerce and return fixnums as-is. (Init_Bignum): Define Bignum as Integer. Don't define ===. * error.c (builtin_class_name): Return "Integer" for fixnums. * sprintf.c (ruby__sfvextra): Use rb_cInteger instead of rb_cFixnum. * ext/-test-/testutil: New directory to test. Currently it provides utilities for fixnum and bignum. * ext/json/generator/generator.c: Define mInteger_to_json. * lib/mathn.rb (Fixnum#/): Redefinition removed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@55024 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01test/lib/test/unit/assertions.rb defines assert_fixnum and assert_bignum.akr
* test/lib/test/unit/assertions.rb (assert_fixnum): Defined. (assert_bignum): Defined. * test/ruby/test_bignum.rb: Use assert_bignum. * test/ruby/test_integer_comb.rb: Use assert_fixnum and assert_bignum. * test/ruby/test_optimization.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54874 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01envutil.rb defines Integer::{FIXNUM_MIN,FIXNUM_MAX}.akr
* test/lib/envutil.rb: Define Integer::{FIXNUM_MIN,FIXNUM_MAX}. * test/ruby/test_bignum.rb: Use Integer::{FIXNUM_MIN,FIXNUM_MAX}. * test/ruby/test_bignum.rb: Ditto. * test/ruby/test_integer_comb.rb: Ditto. * test/ruby/test_marshal.rb: Ditto. * test/ruby/test_optimization.rb: Ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54872 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-05-01* test/lib/test/unit.rb (Options#non_options): fixed wrong regexp.usa
if both positives and negatives were specified, postives had to be spcicifed from the beginning. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54868 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-20assertions.rb: return the exceptionnobu
* test/lib/test/unit/assertions.rb (assert_syntax_error): return the rescued exception object as well as assert_raise. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54653 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-11test/unit.rb: show warning locationsnobu
* test/lib/test/unit.rb (ExcludedMethods.load): supply the path to show the warning locations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54540 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-04-09assertions.rb: set default internal encodingnobu
* test/lib/test/unit/assertions.rb (assert_raise_with_message): set default internal encoding to the excpected message, which affects String#inspect in messages. * test/lib/test/unit/assertions.rb (assert_warning): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54522 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-22test/unit.rb: defer failures in non-replace modenobu
* test/lib/test/unit.rb (Test::Unit::StatusLine#failed): print failed messages only if replacing mode, otherwise defer them until the end, to get rid of interleaving failures with progress messages. refix r54195. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54223 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-21test/unit.rb: show crashed filenobu
* test/lib/test/unit.rb (after_worker_down): show failed file name if worker crashed. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54208 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-19test/unit.rb: defer failures in verbose modenobu
* test/lib/test/unit.rb (Test::Unit::StatusLine#failed): defer failed messages until the end in verbose mode, to get rid of interleaving failures with progress messages. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54195 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-17assertions.rb: fix result of assert_nothing_raisednobu
* test/lib/test/unit/assertions.rb (assert_nothing_raised): do not discard the result of the given block. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54142 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-11* test/lib/test/unit.rb: describe !/REGEXP/ in the help message.akr
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54087 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-11testunit: negative filternobu
* test/lib/test/unit.rb (Options#non_options): make regexp name options prefixed with "!" negative filters. * common.mk (TEST_EXCLUDES): use negative filter to exclude memory leak tests. -x option excludes test files, not test methods. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54086 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-09memory_status.rb: independent of MiniTestnobu
* test/lib/memory_status.rb: make Memory::Status independent of MiniTest::Skip. * test/lib/test/unit/assertions.rb (assert_no_memory_leak): skip if Memory::Status is not available. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54049 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-09memory_status.rb: remove unused valuesnobu
* test/lib/memory_status.rb: remove initial status values, which are not used. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@54048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-03test/unit: not return the cursor if verbosenobu
* test/lib/test/unit.rb (update_status): do not return the cursor if verbose mode, not results and times to overwrite test names. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53985 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-03-02test/unit: return the cursornobu
* test/lib/test/unit.rb (update_status): keep the cursor to the beginning of the line for each update, so that unexpected output like an error message will overwrite but not be concatenated to the status. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-27test/unit: refine output in job_status=normalnobu
* test/lib/test/unit.rb (Test::Unit::StatusLine#jobs_status): show status of only changed woker, not to show same lines repeatedly, in normal job_status mode. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53956 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-27test/unit: fix for the testnobu
* test/lib/test/unit.rb (_run_parallel): make sure retrying message is a separate line. * test/lib/test/unit.rb (_prepare_run): do not add Output if testing. * test/lib/test/unit.rb (Skipping#failed): defer showing reports when showing skips, to be sorted. * test/testunit/test_hideskip.rb (test_hideskip): fix assertion for output misordered by mixing output destinations. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53955 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-27test/unit: refine output in verbose modenobu
* test/lib/test/unit.rb (Test::Unit::StatusLine#_prepare_run): add StatusLine::Output even if job_status is not replace, to filter extra outputs and newlines. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53954 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-27test/unit: add --jobs-status=nonenobu
* test/lib/test/unit.rb (Test::Unit::StatusLine#setup_options): add :none to --jobs-status option. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53953 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-27test/unit: no newlines to be chompednobu
* test/lib/test/unit.rb (Test::Unit::StatusLine::Output#print): matched part never contains a newline to be chomped. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53951 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-17assertions.rb: fix assert_no_memory_leaknobu
* test/lib/test/unit/assertions.rb (assert_no_memory_leak): fix path of memory_status.rb, as this method has been moved. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53853 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-05incompatible encoding workaroundnobu
* test/lib/minitest/unit.rb (puke): workaround incompatible encoding error messages. * test/lib/test/unit/assertions.rb (AllFailures.message): ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53743 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-02-02follow r53691kazu
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53719 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-29suppress warning: assigned but unused variablenaruse
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53691 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-17remove extra dotnobu
* test/lib/test/unit/assertions.rb (all_assertions): remove tail dot as it is added in message again. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53568 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2016-01-05leakchecker.rb: remove temporary measurenobu
* lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler#watcher): make watcher thread restartable. * lib/webrick/utils.rb (WEBrick::Utils::TimeoutHandler#terminate): new method to terminate watcher thread. * test/lib/leakchecker.rb (LeakChecker#find_threads): revert r46941. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53439 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-20assertions.rb: show failed indexesnobu
* test/lib/test/unit/assertions.rb (AllFailures): show indexes in total number of failure assertions. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53210 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2015-12-19test/unit.rb: color on ttynobu
* test/lib/test/unit.rb (Test::Unit::StatusLine#_prepare_run): colorize by default on tty. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@53197 b2dd03c8-39d4-4d8f-98ff-823fe69b080e