diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-24 01:18:34 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-09-24 01:18:34 +0000 |
commit | 569d006295505f8b157f2c1e4fac5bcd3a9619da (patch) | |
tree | cf8491dee6b23761ef4483ecef27895e66716e55 /test | |
parent | 5a121a4f0b8fb9d416566f75047a190166d98609 (diff) | |
download | ruby-569d006295505f8b157f2c1e4fac5bcd3a9619da.tar.gz |
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
Diffstat (limited to 'test')
-rw-r--r-- | test/misc/test_ruby_mode.rb | 10 |
1 files changed, 3 insertions, 7 deletions
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 |