aboutsummaryrefslogtreecommitdiffstats
path: root/test/misc
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-16 06:22:48 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2014-08-16 06:22:48 +0000
commit2fd7e2925588d691c9966806071466934dabcd66 (patch)
tree60fb4e1c1cd04d8c06eb956a575783e93f9d8642 /test/misc
parent4c7038c1777bfe41410fd99ee4b07b3d07f28fc3 (diff)
downloadruby-2fd7e2925588d691c9966806071466934dabcd66.tar.gz
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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@47202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/misc')
-rw-r--r--test/misc/test_ruby_mode.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/misc/test_ruby_mode.rb b/test/misc/test_ruby_mode.rb
index e011ece1cf..5be01747f1 100644
--- a/test/misc/test_ruby_mode.rb
+++ b/test/misc/test_ruby_mode.rb
@@ -34,8 +34,9 @@ class TestRubyMode
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
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