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

test/readline/test_readline.rb: fix argument order

* test/readline/test_readline.rb (TestReadline#test_pre_input_hook)
  (TestReadline#test_insert_text): fix argument order.  expectd value
  should come first.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@36121 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2012-06-17 15:38:22 +00:00
parent 406a9fc5cf
commit 7690aab833

View file

@ -354,9 +354,10 @@ class TestReadline < Test::Unit::TestCase
def test_pre_input_hook
begin
pr = proc {}
assert_equal(Readline.pre_input_hook = pr, pr)
assert_equal(Readline.pre_input_hook, pr)
assert_nil(Readline.pre_input_hook = nil)
Readline.pre_input_hook = pr
assert_equal(pr, Readline.pre_input_hook)
Readline.pre_input_hook = nil
assert_nil(Readline.pre_input_hook)
rescue NotImplementedError
end
end
@ -364,10 +365,10 @@ class TestReadline < Test::Unit::TestCase
def test_insert_text
begin
str = "test_insert_text"
assert_equal(Readline.insert_text(str), Readline)
assert_equal(Readline.line_buffer, str)
assert_equal(Readline.line_buffer.encoding,
get_default_internal_encoding)
assert_equal(Readline, Readline.insert_text(str))
assert_equal(str, Readline.line_buffer)
assert_equal(get_default_internal_encoding,
Readline.line_buffer.encoding)
rescue NotImplementedError
end
end if !/EditLine/n.match(Readline::VERSION)