mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
[ruby/reline] Fix failed test
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
This commit is contained in:
parent
b048fd572a
commit
d340b091a8
1 changed files with 58 additions and 58 deletions
|
@ -2140,8 +2140,8 @@ class Reline::KeyActor::Emacs::Test < Reline::TestCase
|
|||
end
|
||||
|
||||
# Unicode emoji test
|
||||
if Reline::IOGate.encoding == Encoding::UTF_8
|
||||
def test_ed_insert_for_include_zwj_emoji
|
||||
return if Reline::IOGate.encoding != Encoding::UTF_8
|
||||
# U+1F468 U+200D U+1F469 U+200D U+1F467 U+200D U+1F466 is family: man, woman, girl, boy "👨👩👧👦"
|
||||
input_keys("\u{1F468}") # U+1F468 is man "👨"
|
||||
assert_line("\u{1F468}")
|
||||
|
@ -2187,6 +2187,7 @@ class Reline::KeyActor::Emacs::Test < Reline::TestCase
|
|||
end
|
||||
|
||||
def test_ed_insert_for_include_valiation_selector
|
||||
return if Reline::IOGate.encoding != Encoding::UTF_8
|
||||
# U+0030 U+FE00 is DIGIT ZERO + VARIATION SELECTOR-1 "0︀"
|
||||
input_keys("\u0030") # U+0030 is DIGIT ZERO
|
||||
assert_line("\u0030")
|
||||
|
@ -2199,7 +2200,6 @@ class Reline::KeyActor::Emacs::Test < Reline::TestCase
|
|||
assert_cursor(1)
|
||||
assert_cursor_max(1)
|
||||
end
|
||||
end
|
||||
|
||||
def test_em_yank_pop
|
||||
input_keys("def hoge\C-w\C-b\C-f\C-w", false)
|
||||
|
|
Loading…
Reference in a new issue