From 7690aab8333387f2b09346c1290e9adcc664dad2 Mon Sep 17 00:00:00 2001 From: nobu Date: Sun, 17 Jun 2012 15:38:22 +0000 Subject: [PATCH] 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 --- test/readline/test_readline.rb | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/test/readline/test_readline.rb b/test/readline/test_readline.rb index 107cddface..7f00b10721 100644 --- a/test/readline/test_readline.rb +++ b/test/readline/test_readline.rb @@ -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)