diff --git a/ChangeLog b/ChangeLog index cf061c5438..83254836ac 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,12 @@ +Sat Sep 24 10:18:33 2016 Nobuyoshi Nakada + + * test/misc/test_ruby_mode.rb (EXPR_SAVE): use a numeric prefix + argument of 0, not to make the previous version into a backup + file, instead of backup-inhibited. + + * test/misc/test_ruby_mode.rb (run_emacs): always save the buffer + if modified. + Fri Sep 23 23:57:40 2016 Shugo Maeda * vm_method.c (make_method_entry_refined): fix wrong use of ||. diff --git a/test/misc/test_ruby_mode.rb b/test/misc/test_ruby_mode.rb index a91e1c254c..63af0d1ffe 100644 --- a/test/misc/test_ruby_mode.rb +++ b/test/misc/test_ruby_mode.rb @@ -18,12 +18,8 @@ end class TestRubyMode EVAL_OPT = "--eval" - EXPR_SAVE = "(save-buffer)" + EXPR_SAVE = "(save-buffer 0)" EXPR_RUBYMODE = "(ruby-mode)" - EXPR_NOBACKUP = "(progn" \ - " (set (make-local-variable \'backup-inhibited) t)" \ - " (set-buffer-modified-p t)" \ - ")" def run_emacs(src, *exprs) tmp = Tempfile.new(%w"ruby-mode.test. .rb") @@ -31,7 +27,7 @@ class TestRubyMode tmp.close 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_SAVE) output = IO.popen([*EMACS, tmp.path, *exprs, err:[:child, :out]], "r") {|e| e.read} tmp.open result = tmp.read @@ -49,7 +45,7 @@ class TestRubyMode expected.gsub!(space, '') source.gsub!(space, '') end - result, output = run_emacs(source, EXPR_INDENT, EXPR_SAVE) + result, output = run_emacs(source, EXPR_INDENT) assert_match(/^Wrote /, output) assert_equal(expected, result, message(*message) {diff expected, result}) end