From 569d006295505f8b157f2c1e4fac5bcd3a9619da Mon Sep 17 00:00:00 2001 From: nobu Date: Sat, 24 Sep 2016 01:18:34 +0000 Subject: [PATCH] test_ruby_mode.rb: save-buffer 0 * 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. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56222 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 9 +++++++++ test/misc/test_ruby_mode.rb | 10 +++------- 2 files changed, 12 insertions(+), 7 deletions(-) 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