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:
parent
4c7038c177
commit
2fd7e29255
1 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue