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

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
This commit is contained in:
nobu 2014-08-16 06:22:48 +00:00
parent 4c7038c177
commit 2fd7e29255

View file

@ -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