summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2021-06-29Rename error_squiggle to error_highlightYusuke Endoh
Notes: Merged: https://github.com/ruby/ruby/pull/4586
2021-06-29[WIP] add error_squiggle gemYusuke Endoh
``` $ ./local/bin/ruby -e '1.time {}' -e:1:in `<main>': undefined method `time' for 1:Integer (NoMethodError) 1.time {} ^^^^^ Did you mean? times ``` https://bugs.ruby-lang.org/issues/17930 Notes: Merged: https://github.com/ruby/ruby/pull/4586
2021-06-29Add basic test for updated IO wait functions.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4612
2021-06-29Use assert_not_match "Did you mean?" for UncorrectableNameCheckTestYusuke Endoh
... instead of exact matching. I'm now creating a built-in gem that modifies Exception's error message, so the expectation value is changed. IMO, it is good to check that did_you_mean suggestion is NOT added in the uncorrectable case. https://github.com/ruby/did_you_mean/commit/ebe88ec4d2
2021-06-29Prefer qualified names under ThreadNobuyoshi Nakada
2021-06-27Check if closed after each yield [Bug #17661]Nobuyoshi Nakada
2021-06-26Work around issue transcoding issue with non-ASCII compatible encodings and ↵Jeremy Evans
xml escaping When using a non-ASCII compatible source and destination encoding and xml escaping (the :xml option to String#encode), the resulting string was broken, as it used the correct non-ASCII compatible encoding, but contained data that was ASCII-compatible instead of compatible with the string's encoding. Work around this issue by detecting the case where both the source and destination encoding are non-ASCII compatible, and transcoding the source string from the non-ASCII compatible encoding to UTF-8. The xml escaping code will correctly handle the UTF-8 source string and the return the correctly encoded and escaped value. Fixes [Bug #12052] Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/4605 Merged-By: jeremyevans <code@jeremyevans.net>
2021-06-26Scan the coderange in the given encodingNobuyoshi Nakada
2021-06-25Revert "Revert "[ruby/reline] Fix failed test""aycabta
I'm so sorry, the previous revert was just a mistake. This reverts commit 9103c3ba8bc09f287f69ca322f58faa34e003f2e.
2021-06-25Revert "[ruby/reline] Fix failed test"aycabta
This reverts commit 491591c7cee842601118efc2698e0e41283827b3.
2021-06-25[ruby/reline] Fix failed testima1zumi
For ruby/ruby repository's AppVeyor CI (Windows environment), `Reline::IOGate.encoding` will be changed from `UTF-8` to `Windows-31J` after the test is run. So, when `test/reline/test_key_actor_emacs.rb` is loaded, `Reline::IOGate.encoding == Encoding::UTF_8` will be `true`, but at the time of test execution, `Reline::IOGate.encoding` is `Windows-31J`. For this reason, I changed the test method to check `Reline::IOGate.encoding` in the test method. https://github.com/ruby/reline/commit/10e1ce3320
2021-06-25[ruby/racc] Stop compressing integer listsJean Boussier
It is unclear why this was implemented, I assume it was for performance back in 2006. However today, this compression defeats bytecode caching entirely and end up being counter productive. https://github.com/ruby/racc/commit/ae3703c1d0
2021-06-24Remove shift of ep when computing Proc#hashJeremy Evans
The shift was causing far fewer unique values of hash than expected. Fix pointed out by xtkoba (Tee KOBAYASHI) Fixes [Bug #17951] Notes: Merged: https://github.com/ruby/ruby/pull/4574
2021-06-24Actually ignore FNM_CASEFOLD flag in Dir.globJeremy Evans
This was already documented as being ignored, but it wasn't being ignored, causing an issue in a particular case where a UTF-8 pattern was provided and a filename was tested that wasn't valid UTF-8. Fixes [Bug #14456] Notes: Merged: https://github.com/ruby/ruby/pull/4583
2021-06-23Check type of instruction - can be INSN or ADJUSTeileencodes
If the type is ADJUST we don't want to treat it like an INSN so we have to check the type before reading from `insn_info.events`. [Bug #18001] [ruby-core:104371] Co-authored-by: Aaron Patterson <tenderlove@ruby-lang.org> Notes: Merged: https://github.com/ruby/ruby/pull/4601
2021-06-23Add detailed message to assert_external_string_equalaycabta
2021-06-23Discard RDOCOPT environment variable to make tests stableNobuyoshi Nakada
2021-06-23Dispose the global rubygems configuration wholelyNobuyoshi Nakada
2021-06-23Clear rdoc options in the global rubygems configurationNobuyoshi Nakada
2021-06-23Clear default configurationsNobuyoshi Nakada
Remove environment variables which can affect the default configurations.
2021-06-23Make temporary directory under the regular locationNobuyoshi Nakada
2021-06-23Close UserInteraction for tests to fix leaked file descriptorsNobuyoshi Nakada
2021-06-23[ruby/rdoc] Use pend instead of skipHiroshi SHIBATA
https://github.com/ruby/rdoc/commit/8460a36d84
2021-06-23[ruby/rdoc] Update test/rdoc/test_rdoc_rubygems_hook.rbHiroshi SHIBATA
https://github.com/ruby/rdoc/commit/fb264c4cc4 Co-authored-by: Nobuyoshi Nakada <nobu@ruby-lang.org>
2021-06-23[ruby/rdoc] Rwrite test-case for rubygems_hook without Gem::TestCaseHiroshi SHIBATA
https://github.com/ruby/rdoc/commit/f8d1087ce5
2021-06-23Strip trailing spacesNobuyoshi Nakada
2021-06-22[ruby/irb] Sort ls result ordered by anscestryKeiko Kaneko
https://github.com/ruby/irb/commit/fdd5c0a71e
2021-06-22Rework `sysread` to use blocking `read_internal_locktmp`.Samuel Williams
Notes: Merged: https://github.com/ruby/ruby/pull/4592
2021-06-22Avoid a duplicated method definition of Object#stubYusuke Endoh
http://rubyci.s3.amazonaws.com/ubuntu/ruby-master/log/20210622T063005Z.log.html.gz ``` /home/chkbuild/chkbuild/tmp/build/20210622T063005Z/ruby/test/rubygems/helper.rb:1565: warning: method redefined; discarding old stub /home/chkbuild/chkbuild/tmp/build/20210622T063005Z/ruby/test/resolv/test_dns.rb:8: warning: previous definition of stub was here ```
2021-06-21Fix finish_using_lib_relineaycabta
2021-06-21Call super method by teardown of tests of Reline as Readlineaycabta
2021-06-21Call Reline-specific method in helper fileaycabta
2021-06-21Rescue conversion error of inputrcaycabta
2021-06-21Call Reline.test_reset in teardown of tests for readline definitelyaycabta
2021-06-21Use test encoding for TestRelineAsReadline and TestRelineAsReadlineHistoryaycabta
2021-06-21Stop using global constant, RELINE_TEST_ENCODINGaycabta
2021-06-21Call Reline.test_reset in teardown definitelyaycabta
2021-06-21Revert "Use Encoding.default_external for tests of Readline::HISTORY"aycabta
This reverts commit 089a26b0a619a649b1958061df8f21a6cdc6cacd.
2021-06-21Use Encoding.default_external for tests of Readline::HISTORYaycabta
2021-06-21[ruby/reline] Remove an obsolete commented-out testaycabta
https://github.com/ruby/reline/commit/5354d02e03
2021-06-21[ruby/reline] Add yamatanooroti test about set and exchange markaycabta
https://github.com/ruby/reline/commit/2e6fdca5c6
2021-06-21[ruby/reline] Reset config for random testaycabta
https://github.com/ruby/reline/commit/c39615e1dd
2021-06-21[ruby/reline] Handle Errno::ENOTTY correctlyaycabta
https://github.com/ruby/reline/commit/8daa392ba6
2021-06-21[ruby/reline] Add a test for pasting Cyrillic chars into command prompt on ↵aycabta
cp 850 This closes https://github.com/ruby/reline/issues/103. https://github.com/ruby/reline/commit/213e0523d5
2021-06-21[ruby/reline] The config file must accept any character encodingaycabta
In Japan, so many programmers used EUC-JP to write text files that contain Japanese. Many .inputrc files which contain EUC-JP are still being copied and used. This commit supports the whole encoding of what user set including UTF-8. ref. https://github.com/ruby/reline/pull/280 https://github.com/ruby/reline/commit/0b45022e16
2021-06-21[ruby/reline] Use ReadConsoleInputW() instead of getwch()aycabta
This needs https://github.com/aycabta/yamatanooroti/pull/19, which is released by yamatanooroti gem 0.0.7, to test with yamatanooroti. https://github.com/ruby/reline/commit/06c1f45da1
2021-06-21[ruby/reline] ensure reline's encoding is used when reading inputrc ↵Mark Delk
character values This change ensures we use `Reline::IOGate`'s `encoding` when converting characters from their integer values. This fixes an issue that may occur if you have UTF characters in your `.inputrc`, but your default encoding isn't set. For example: ``` > 127864.ord.chr RangeError: 127864 out of char range from (pry):1:in `chr' > Reline::IOGate.encoding => #<Encoding:UTF-8> > 127864.ord.chr(Reline::IOGate.encoding) => "🍸" ``` https://github.com/ruby/reline/commit/cf372fc0fc
2021-06-18ast.rb: RubyVM::AST.parse and .of accepts `save_script_lines: true`Yusuke Endoh
This option makes the parser keep the original source as an array of the original code lines. This feature exploits the mechanism of `SCRIPT_LINES__` but records only the specified code that is passed to RubyVM::AST.of or .parse, instead of recording all parsed program texts. Notes: Merged: https://github.com/ruby/ruby/pull/4581
2021-06-17[rubygems/rubygems] Close then unlink tempfiles on WindowsNobuyoshi Nakada
In ruby/ruby test actions, number of "leaked tempfile" messages are shown on Windows. As Windows disallows removing open files, `Tempfile#unlink` fails silently before `#close`. Close then unlink by `#close!` instead. https://github.com/rubygems/rubygems/commit/fe0b88ac30
2021-06-15Time#getlocal tests for [Feature #17544]Nobuyoshi Nakada