[前][次][番号順一覧][スレッド一覧]

ruby-changes:24070

From: nobu <ko1@a...>
Date: Mon, 18 Jun 2012 00:38:35 +0900 (JST)
Subject: [ruby-changes:24070] nobu:r36121 (trunk): test/readline/test_readline.rb: fix argument order

nobu	2012-06-18 00:38:22 +0900 (Mon, 18 Jun 2012)

  New Revision: 36121

  http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=36121

  Log:
    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.

  Modified files:
    trunk/test/readline/test_readline.rb

Index: test/readline/test_readline.rb
===================================================================
--- test/readline/test_readline.rb	(revision 36120)
+++ test/readline/test_readline.rb	(revision 36121)
@@ -354,9 +354,10 @@
   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 @@
   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)

--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]