1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

Skip tests depend on Readline's special behaviors

This commit is contained in:
aycabta 2019-05-13 03:29:18 +09:00
parent caef2ddaaf
commit 75f196ce75

View file

@ -113,7 +113,7 @@ class TestReadline < Test::Unit::TestCase
assert_equal(true, Readline.line_buffer.tainted?) assert_equal(true, Readline.line_buffer.tainted?)
assert_equal(21, Readline.point) assert_equal(21, Readline.point)
end end
end end if Readline != Reline
end end
def test_input= def test_input=
@ -376,12 +376,14 @@ class TestReadline < Test::Unit::TestCase
assert_equal(str, Readline.line_buffer) assert_equal(str, Readline.line_buffer)
Readline.delete_text Readline.delete_text
unless Readline == Reline
# NOTE: unexpected but GNU Readline's spec # NOTE: unexpected but GNU Readline's spec
assert_equal(16, Readline.point) assert_equal(16, Readline.point)
assert_equal("", Readline.line_buffer) assert_equal("", Readline.line_buffer)
assert_equal(Readline, Readline.insert_text(str)) assert_equal(Readline, Readline.insert_text(str))
assert_equal(32, Readline.point) assert_equal(32, Readline.point)
assert_equal("", Readline.line_buffer) assert_equal("", Readline.line_buffer)
end
rescue NotImplementedError rescue NotImplementedError
end if !/EditLine/n.match(Readline::VERSION) end if !/EditLine/n.match(Readline::VERSION)
@ -399,7 +401,9 @@ class TestReadline < Test::Unit::TestCase
line = Readline.readline("> ") line = Readline.readline("> ")
assert_equal("hello world", line) assert_equal("hello world", line)
end end
unless Readline == Reline # Reline's rendering logic is tricky
assert_equal("> hello world\n", stdout.read) assert_equal("> hello world\n", stdout.read)
end
stdout.close stdout.close
rescue NotImplementedError rescue NotImplementedError
ensure ensure