diff options
| author | Yusuke Endoh <mame@ruby-lang.org> | 2021-12-24 14:46:58 +0900 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2021-12-24 15:01:17 +0900 |
| commit | 424800f70711433534d9669cb891dc828e7c7001 (patch) | |
| tree | 14ad1a3f178c67aaf52698693cc5cdbf9a291440 /include | |
| parent | 167dd73c6c90a79af6e6e14c33e4b2743de866e5 (diff) | |
[ruby/reline] Fix test input_keys to handle "hankaku" characters correctly on Windows
The method "input_keys" in test/reline/helper.rb handles a single-byte
and 8-bit charater as an input with the meta key.
However, "test_halfwidth_kana_width_dakuten" in test/reline/test_key_actor_emacs.rb
uses a string that contains "hankaku" characters.
A "hankaku" character is not with the meta key, but it is a single-byte
and 8-bit character on Windows-31J encoding, which confused "input_keys"
method. This caused the following error.
https://ci.appveyor.com/project/ruby/ruby/builds/41997092/job/ejm77qxgvnlpdwvg
```
1) Failure:
Reline::KeyActor::Emacs::Test#test_halfwidth_kana_width_dakuten [C:/projects/ruby/test/reline/test_key_actor_emacs.rb:2311]:
<"\xB6\xDE\xB7\xDE\xB9\xDE\xBA\xDE" (#<Encoding:Windows-31J>)> expected but was
<"\e^\e^\e^\e:\e^" (#<Encoding:Windows-31J>)> in <Terminal #<Encoding:Windows-31J>>
.
<8> expected but was
<10>.
Finished tests in 1045.472722s, 19.3922 tests/s, 2609.4320 assertions/s.
```
This change introduces "input_raw_keys" that does not convert a
single-byte and 8-bit character to "with the meta key", and use it in
the test in question.
https://github.com/ruby/reline/commit/f6ae0e5d19
Diffstat (limited to 'include')
0 files changed, 0 insertions, 0 deletions
