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

ruby-changes:35120

From: nobu <ko1@a...>
Date: Sat, 16 Aug 2014 15:23:00 +0900 (JST)
Subject: [ruby-changes:35120] nobu:r47202 (trunk): test_ruby_mode.rb: trivial refinement

nobu	2014-08-16 15:22:48 +0900 (Sat, 16 Aug 2014)

  New Revision: 47202

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

  Log:
    test_ruby_mode.rb: trivial refinement
    
    * test/misc/test_ruby_mode.rb (run_emacs): ensure to remove a
      temporary file.
    
    * test/misc/test_ruby_mode.rb (assert_indent): show diff between
      expected and actual results.

  Modified files:
    trunk/test/misc/test_ruby_mode.rb
Index: test/misc/test_ruby_mode.rb
===================================================================
--- test/misc/test_ruby_mode.rb	(revision 47201)
+++ test/misc/test_ruby_mode.rb	(revision 47202)
@@ -34,8 +34,9 @@ class TestRubyMode https://github.com/ruby/ruby/blob/trunk/test/misc/test_ruby_mode.rb#L34
     output = IO.popen([*EMACS, tmp.path, *exprs, err:[:child, :out]], "r") {|e| e.read}
     tmp.open
     result = tmp.read
-    tmp.close!
     return result, output
+  ensure
+    tmp.close!
   end
 
   class TestIndent < self
@@ -49,7 +50,7 @@ class TestRubyMode https://github.com/ruby/ruby/blob/trunk/test/misc/test_ruby_mode.rb#L50
       end
       result, output = run_emacs(source, EXPR_INDENT, EXPR_SAVE)
       assert_match(/^Wrote /, output)
-      assert_equal(expected, result, *message)
+      assert_equal(expected, result, message(*message) {diff expected, result})
     end
 
     def test_simple

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

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