summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-27 09:17:23 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2016-12-27 09:17:23 +0000
commit0dddf3cbb9b3d1e63f68033d60c161a82ef62bf6 (patch)
treeb64deeee66eb2a85457f4609778b28035a9e0c15 /test
parentacec934e74029993852951b14807ac2ca0025547 (diff)
merge revision(s) 56224: [Backport #12785]
* test/misc/test_ruby_mode.rb (assert_indent): since write-region in Emacs 25.1 no longer displays the "Wrote file" message, shows the explicit message to check if successfully finished. [ruby-core:77355] [Bug #12785] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_2@57207 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/misc/test_ruby_mode.rb6
1 files changed, 5 insertions, 1 deletions
diff --git a/test/misc/test_ruby_mode.rb b/test/misc/test_ruby_mode.rb
index 5be01747f1..c49a50d122 100644
--- a/test/misc/test_ruby_mode.rb
+++ b/test/misc/test_ruby_mode.rb
@@ -18,6 +18,9 @@ end
class TestRubyMode
EVAL_OPT = "--eval"
EXPR_SAVE = "(save-buffer)"
+ finish_mark = "ok-#{$$}"
+ FINISH_MARK = /^#{finish_mark}$/
+ EXPR_FINISH = "(print \'#{finish_mark})"
EXPR_RUBYMODE = "(ruby-mode)"
EXPR_NOBACKUP = "(progn" \
" (set (make-local-variable \'backup-inhibited) t)" \
@@ -31,6 +34,7 @@ class TestRubyMode
exprs = exprs.map {|expr| [EVAL_OPT, expr]}.flatten
exprs.unshift(EVAL_OPT, EXPR_RUBYMODE)
exprs.unshift(EVAL_OPT, EXPR_NOBACKUP)
+ exprs.push(EVAL_OPT, EXPR_FINISH)
output = IO.popen([*EMACS, tmp.path, *exprs, err:[:child, :out]], "r") {|e| e.read}
tmp.open
result = tmp.read
@@ -49,7 +53,7 @@ class TestRubyMode
source.gsub!(space, '')
end
result, output = run_emacs(source, EXPR_INDENT, EXPR_SAVE)
- assert_match(/^Wrote /, output)
+ assert_match(FINISH_MARK, output)
assert_equal(expected, result, message(*message) {diff expected, result})
end