summaryrefslogtreecommitdiff
path: root/test
Commit message (Collapse)AuthorAgeFilesLines
* [rubygems/rubygems] Use assert_raise instead of assert_raisesHiroshi SHIBATA2021-05-1269-410/+410
| | | | https://github.com/rubygems/rubygems/commit/769e87f011
* [rubygems/rubygems] Use dummy assertion for assert_httpsHiroshi SHIBATA2021-05-121-1/+1
| | | | https://github.com/rubygems/rubygems/commit/64d843fe17
* [rubygems/rubygems] Use capture_output instead of assert_silentHiroshi SHIBATA2021-05-121-1/+3
| | | | https://github.com/rubygems/rubygems/commit/3225aab7f8
* [rubygems/rubygems] Use capture_output instead of capture_io for test-unitHiroshi SHIBATA2021-05-122-2/+2
| | | | https://github.com/rubygems/rubygems/commit/ab9c80d4cb
* [rubygems/rubygems] Use assert_path_exist and assert_path_not_exist instead ↵Hiroshi SHIBATA2021-05-1235-301/+301
| | | | | | of assert_path_exists and refute_path_exists https://github.com/rubygems/rubygems/commit/a7c93558c3
* [rubygems/rubygems] Extract assert_output to assert_empty and assert_equal ↵Hiroshi SHIBATA2021-05-124-5/+14
| | | | | | with capture_output https://github.com/rubygems/rubygems/commit/f6759440a4
* [rubygems/rubygems] Use Regexp with refute_matchHiroshi SHIBATA2021-05-123-3/+3
| | | | https://github.com/rubygems/rubygems/commit/51fdbe53bc
* [rubygems/rubygems] Also use capture_output instead of capture_ioHiroshi SHIBATA2021-05-121-1/+1
| | | | https://github.com/rubygems/rubygems/commit/229858ea56
* [rubygems/rubygems] Use capture_output instead of capture_io.Hiroshi SHIBATA2021-05-1212-33/+33
| | | | https://github.com/rubygems/rubygems/commit/ad9206d4d0
* skip test for debug.Koichi Sasada2021-05-121-0/+2
| | | | | | | | test_memsize_of_iseq fails on repeat tests and it seems to difficult to solve immediately. Now this test is skipped. It seems that the result of `memsize_of(Object.new)` are increased. Why...?
* suppress warnings on repeat tests.Koichi Sasada2021-05-121-3/+2
| | | | | | Constant definitions are affect on outer namespace of an anonymous module. To define constants on the anonymous module, this patch uses Module#class_eval(str).
* test_cdhash: refactor change class卜部昌平2021-05-122-15/+15
| | | | It is now strange to test Complex in a class named Rational_Test.
* cdhash_cmp: can also take complex卜部昌平2021-05-121-0/+4
| | | | There are complex literals `123i`, which can also be a case condition.
* cdhash_cmp: rational literals with fractions卜部昌平2021-05-121-0/+4
| | | | Nobu kindly pointed out that rational literals can have fractions.
* cdhash_cmp: can take rational literals卜部昌平2021-05-121-0/+7
| | | | | | | Rational literals are those integers suffixed with `r`. They tend to be a part of more complex expressions like `123/456r`, but in theory they can live alone. When such "bare" rational literals are passed to case-when branch, we have to take care of them. Fixes [Bug #17854]
* Run nmake check on Actions (#4487)Takashi Kokubun2021-05-115-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Run nmake check on Actions * Skip tests not working in mswin GitHub Actions * Override TEMP * Revert "Skip tests not working in mswin GitHub Actions" This reverts commit 544d2575fcdf23ae63cd25aa03fce10c28b259f2. * Revert "Revert "Skip tests not working in mswin GitHub Actions"" This reverts commit e1f8ad7862c9c4be52dc6e1031a004621eb07e6e. * Fix timeouts * Skip some more broken tests * Update windows.yml * Add a guard for rbasic_spec * Revert "Update windows.yml" This reverts commit bc9694b6b3b9594d406378d15ca11723fb052bc8. * Skip the ensure clause * Simplify the ensure
* Method cache: fix refinement entry handlingAlan Wu2021-05-111-0/+49
| | | | | | | | | | | | | | | | | | | | To invalidate some callable method entries, we replace the entry in the class. Most types of method entries are on the method table of the origin class, but refinement entries without an orig_me are housed in the method table of the class itself. They are there because refinements take priority over prepended methods. By unconditionally inserting a copy of the refinement entry into the origin class, clearing the method cache created situations where there are refinement entry duplicates in the lookup chain, leading to infinite loops and other problems. Update the replacement logic to use the right class that houses the method entry. Also, be more selective about cache invalidation when moving refinement entries for prepend. This avoids calling clear_method_cache_by_id_in_class() before refinement entries are in the place it expects. [Bug #17806]
* test/irb/test_raise_no_backtrace_exception.rb: Set LC_MESSAGES as UTF-8Yusuke Endoh2021-05-111-1/+3
|
* [ruby/irb] Skip test_raise_exception_with_invalid_byte_sequenceTakashi Kokubun2021-05-111-2/+2
| | | | | | on Windows for now. It seems like we haven't figured this out yet. https://github.com/ruby/irb/commit/ecf5a1ace1
* Explicitly specify encoding for another test as wellTakashi Kokubun2021-05-101-2/+2
| | | | | Same as e2ccc3301e2c69533b9ef2464613781c6c964c3a https://ci.appveyor.com/project/ruby/ruby/builds/39102539/job/k8m1yrrjesxbgvtq
* test/irb/test_raise_no_backtrace_exception.rb: UTF-8 is expectedYusuke Endoh2021-05-111-1/+1
| | | | | | | | | | | | | | | | ... for the output of assert_in_out_err. This will fix the following failure on many CI machines http://rubyci.s3.amazonaws.com/arch/ruby-master/log/20210511T030005Z.fail.html.gz ``` 1) Failure: TestIRB::TestRaiseNoBacktraceException#test_raise_exception_with_different_encoding_containing_invalid_byte_sequence [/home/chkbuild/chkbuild/tmp/build/20210511T030005Z/ruby/test/irb/test_raise_no_backtrace_exception.rb:41]: pid 221531 exit 0. 1. [1/2] Assertion for "stdout" | invalid byte sequence in US-ASCII. ```
* [ruby/irb] Skip the new IRB test on Windows for nowTakashi Kokubun2021-05-111-1/+1
| | | | | | | | It's not passing from the beginning https://github.com/ruby/ruby/runs/2550929220 https://ci.appveyor.com/project/ruby/ruby/builds/39100747 https://github.com/ruby/irb/commit/71fc180018
* Sync bundler & rubygemsDavid Rodríguez2021-05-111-2/+46
|
* [ruby/irb] Treat encodings in exception correctlyaycabta2021-05-111-0/+25
| | | | https://github.com/ruby/irb/commit/4452adbe04
* [ruby/psych] Fix custom marshalization with symbolize_names: trueJean Boussier2021-05-101-0/+8
| | | | https://github.com/ruby/psych/commit/ee26f26ab5
* [ruby/psych] Use assert_raise instead of assert_raisesHiroshi SHIBATA2021-05-1012-61/+61
| | | | https://github.com/ruby/psych/commit/e6ad12b4e1
* [ruby/psych] Use pend instead of skipHiroshi SHIBATA2021-05-102-2/+2
| | | | https://github.com/ruby/psych/commit/efd2a62c9a
* [ruby/psych] Fixed test-case for NaNHiroshi SHIBATA2021-05-101-2/+2
| | | | https://github.com/ruby/psych/commit/f85a008263
* [ruby/psych] Use Ractor constant for ignoreing conditionHiroshi SHIBATA2021-05-101-1/+1
| | | | https://github.com/ruby/psych/commit/cc5f957327
* [ruby/psych] Use test-unit instead of minitestHiroshi SHIBATA2021-05-101-8/+2
| | | | https://github.com/ruby/psych/commit/01e7310dd3
* Fix Math.cbrt(0.0) on glibcJeremy Evans2021-05-081-0/+1
| | | | | | This should return 0, but on glibc it returned NaN. Fixes [Bug #17804]
* [ruby/irb] Deal with different screen sizesNobuyoshi Nakada2021-05-081-4/+4
| | | | https://github.com/ruby/irb/commit/7118b3322f
* [ruby/irb] Dump ancestors' methods by ls commandMasataka Pocke Kuwabara2021-05-081-1/+22
| | | | https://github.com/ruby/irb/commit/73edff287c
* Use assert_ractor for separating test processesHiroshi SHIBATA2021-05-061-5/+4
|
* [ruby/timeout] Make Timeout::Error#exception with multiple arguments not ↵Jeremy Evans2021-05-061-0/+8
| | | | | | | | | | | | | | | | | ignore arguments This makes: raise(Timeout::Error.new("hello"), "world") raise a TimeoutError instance with "world" as the message instead of "hello", for consistency with other Ruby exception classes. This required some internal changes to keep the tests passing. Fixes [Bug #17812] https://github.com/ruby/timeout/commit/952154dbf9
* [ruby/strscan] Fix segmentation fault of `StringScanner#charpos` when ↵Kenichi Kamiya2021-05-061-0/+17
| | | | | | `String#byteslice` returns non string value [Bug #17756] (#20) https://github.com/ruby/strscan/commit/92961cde2b
* Import from https://github.com/ruby/strscan/pull/19Hiroshi SHIBATA2021-05-061-1/+1
| | | | | | * Use Gemfile instead of Gem::Specification#add_development_dependency. * Use pend instead of skip for test-unit.
* [ruby/net-http] Do not require stringioKazuki Yamaguchi2021-05-061-1/+0
| | | | | | | | | It is not used in net/http library code since commit 15ccd0118c13 (r36473 in ruby svn trunk, 2012). require's in test suite are also cleaned up. https://github.com/ruby/net-http/commit/996d18a43f
* [ruby/net-imap] Move UTF7 & datetime formatting to net/imap/data_encodingnicholas a. evans2021-05-062-38/+46
| | | | | | Partially implements #10. https://github.com/ruby/net-imap/commit/0d43c5e856
* [ruby/net-imap] Update AUTH=PLAIN to be a little closer to RFC4616nicholas a. evans2021-05-061-0/+23
| | | | | | | | * Add authzid support * must not contain NULL chars * improve rdoc https://github.com/ruby/net-imap/commit/a587fc71b7
* test/net/ftp/test_ftp.rb - fix intermittent MinGW failureMSP-Greg2021-05-051-1/+1
| | | | | | | | | | | | | | | | | | | | Fixes intermittent error as below: [242/838] 5316=test_ftp #<Thread:0x0000020aa8733f20 D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:2532 run> terminated with exception (report_on_exception is true): D:/a/ruby/ruby/src/tool/lib/minitest/unit.rb:199:in `assert': Expected #<Errno::ECONNRESET: An existing connection was forcibly closed by the remote host.> to be nil. (MiniTest::Assertion) from D:/a/ruby/ruby/src/tool/lib/test/unit/core_assertions.rb:504:in `assert' from D:/a/ruby/ruby/src/tool/lib/minitest/unit.rb:299:in `assert_nil' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:430:in `ensure in block in test_list_read_timeout_exceeded' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:431:in `block in test_list_read_timeout_exceeded' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:2539:in `block in create_ftp_server' D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:426:in `write': An existing connection was forcibly closed by the remote host. (Errno::ECONNRESET) from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:426:in `print' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:426:in `block (2 levels) in test_list_read_timeout_exceeded' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:420:in `each' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:420:in `each_with_index' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:420:in `block in test_list_read_timeout_exceeded' from D:/a/ruby/ruby/src/test/net/ftp/test_ftp.rb:2539:in `block in create_ftp_server'
* test/net/imap/test_imap.rb: wait a moment before socket is closedYusuke Endoh2021-05-041-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | to try to suppress a failure on Solaris. This is the same as 19504d115dc09558255fcb5213f80dd8454ab189 http://rubyci.s3.amazonaws.com/solaris11-sunc/ruby-master/log/20210504T070007Z.fail.html.gz ``` 1) Error: IMAPTest#test_idle_done_not_during_idle: Errno::EINVAL: Invalid argument - connect(2) for [::1]:33839 /export/home/chkbuild/chkbuild-sunc/tmp/build/20210504T070007Z/ruby/.ext/common/socket.rb:1214:in `__connect_nonblock' /export/home/chkbuild/chkbuild-sunc/tmp/build/20210504T070007Z/ruby/.ext/common/socket.rb:1214:in `connect_nonblock' /export/home/chkbuild/chkbuild-sunc/tmp/build/20210504T070007Z/ruby/.ext/common/socket.rb:56:in `connect_internal' /export/home/chkbuild/chkbuild-sunc/tmp/build/20210504T070007Z/ruby/.ext/common/socket.rb:137:in `connect' /export/home/chkbuild/chkbuild-sunc/tmp/build/20210504T070007Z/ruby/.ext/common/socket.rb:642:in `block in tcp' /export/home/chkbuild/chkbuild-sunc/tmp/build/20210504T070007Z/ruby/.ext/common/socket.rb:227:in `each' /export/home/chkbuild/chkbuild-sunc/tmp/build/20210504T070007Z/ruby/.ext/common/socket.rb:227:in `foreach' /export/home/chkbuild/chkbuild-sunc/tmp/build/20210504T070007Z/ruby/.ext/common/socket.rb:632:in `tcp' /export/home/chkbuild/chkbuild-sunc/tmp/build/20210504T070007Z/ruby/lib/net/imap.rb:1223:in `tcp_socket' /export/home/chkbuild/chkbuild-sunc/tmp/build/20210504T070007Z/ruby/lib/net/imap.rb:1180:in `initialize' /export/home/chkbuild/chkbuild-sunc/tmp/build/20210504T070007Z/ruby/test/net/imap/test_imap.rb:289:in `new' /export/home/chkbuild/chkbuild-sunc/tmp/build/20210504T070007Z/ruby/test/net/imap/test_imap.rb:289:in `test_idle_done_not_during_idle' ```
* Fix test/net/http/test_https.rb host naming for WindowsMSP-Greg2021-05-041-43/+25
|
* Workaround failures on WindowsNobuyoshi Nakada2021-05-041-0/+2
|
* test/net/smtp/test_smtp.rb: wait a moment before socket is closedYusuke Endoh2021-04-301-0/+1
| | | | | | | | | | | | | | On Solaris, Socket.tcp seems to fail with EINVAL if the server closes the connection immediately after accpeted. I think this is a bug of Socket.tcp, but seems difficult to fix soon. http://rubyci.s3.amazonaws.com/solaris11-sunc/ruby-master/log/20210429T100007Z.fail.html.gz ``` 1) Failure: Net::TestSMTP#test_eof_error_backtrace [/export/home/chkbuild/chkbuild-sunc/tmp/build/20210429T100007Z/ruby/test/net/smtp/test_smtp.rb:193]: [ruby-core:78550] [Bug #13018]. [EOFError] exception expected, not #<Net::ReadTimeout: Net::ReadTimeout>. ```
* Guard for < Ruby 3.0Hiroshi SHIBATA2021-04-281-1/+1
|
* [ruby/optparse] Add EditorConfig fileAlexander Popov2021-04-281-1/+0
| | | | | | | | | | More info here: https://editorconfig.org/ For example, `ruby/ruby` has it: https://github.com/ruby/ruby/blob/05ebaee/.editorconfig Also fix some offenses. https://github.com/ruby/optparse/commit/29402e7e0e
* [ruby/net-http] Decode user and password from env configured proxyLukas Eipert2021-04-281-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | If someone sets an env variable defining a http_proxy, containing a username / password with percent-encoded characters, then the resulting base64 encoded auth header will be wrong. For example, suppose a username is `Y\X` and the password is `R%S] ?X`. Properly URL encoded the proxy url would be: http://Y%5CX:R%25S%5D%20%3FX@proxy.example:8000 The resulting proxy auth header should be: `WVxYOlIlU10gP1g=`, but the getters defined by ruby StdLib `URI` return a username `Y%5CX` and password `R%25S%5D%20%3FX`, resulting in `WSU1Q1g6UiUyNVMlNUQlMjAlM0ZY`. As a result the proxy will deny the request. Please note that this is my first contribution to the ruby ecosystem, to standard lib especially and I am not a ruby developer. References: - https://gitlab.com/gitlab-org/gitlab/-/issues/289836 - https://bugs.ruby-lang.org/projects/ruby-master/repository/trunk/revisions/58461 - https://bugs.ruby-lang.org/issues/17542 https://github.com/ruby/net-http/commit/e57d4f38aa
* test/net/ftp/test_ftp.rb: Use RubyVM::JIT instead of RubyVM::MJITYusuke Endoh2021-04-281-1/+1
|
* test/net/ftp/test_ftp.rb: reduce the size of a long responseYusuke Endoh2021-04-281-2/+2
| | | | | | | | "9" * 999999999 (about 1 GB) was too large for some CI servers. This commit changes the size to 999999 (about 1 MB). http://rubyci.s3.amazonaws.com/scw-9d6766/ruby-master/log/20210427T141707Z.fail.html.gz http://rubyci.s3.amazonaws.com/raspbian10-aarch64/ruby-master/log/20210427T145408Z.fail.html.gz