summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-10-09 16:08:09 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-10-09 16:27:34 +0900
commitf178ff39334ac2fb33de0d6c3e6ec8fb7714e8da (patch)
tree44084b4e5b80b87765f49a911e60b45374c7ae16 /test
parent43f692248e93a3a43f07f9f1e9b5c4659d65c88a (diff)
Allow abbreviated dump options with additional options
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6518
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_rubyoptions.rb5
1 files changed, 3 insertions, 2 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index cf6829cf88..0198bbd900 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -1001,8 +1001,7 @@ class TestRubyOptions < Test::Unit::TestCase
stderr = []
Tempfile.create(%w"bug10435- .rb") do |script|
dir, base = File.split(script.path)
- script.puts "abort ':run'"
- script.close
+ File.write(script, "abort ':run'\n")
opts = ['-C', dir, '-r', "./#{base}", *opt]
_, e = assert_in_out_err([*opts, '-ep'], "", //)
stderr.concat(e) if e
@@ -1026,6 +1025,8 @@ class TestRubyOptions < Test::Unit::TestCase
def test_dump_parsetree_with_rflag
assert_norun_with_rflag('--dump=parsetree')
assert_norun_with_rflag('--dump=parsetree', '-e', '#frozen-string-literal: true')
+ assert_norun_with_rflag('--dump=parsetree+error_tolerant')
+ assert_norun_with_rflag('--dump=parse+error_tolerant')
end
def test_dump_insns_with_rflag