summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-18 15:16:52 +0000
committerusa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-03-18 15:16:52 +0000
commitc17242100cd5ef5a5cb7165e1ffe237f1d120318 (patch)
treea5172521051ac1b38f381e5452efca814db9c721 /test
parent541f4f250276c1f999c651a6f5699565e77d850b (diff)
merge revision(s) 60160: [Backport #13998]
parse.y: token info with BOM * parse.y (parser_prepare): set token_info_enabled flag first, before returning at BOM. [ruby-dev:50288] [Bug #13998] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_2_3@62822 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_rubyoptions.rb10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index 4495e1e4ea..6f4ecc8d77 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -406,6 +406,16 @@ class TestRubyOptions < Test::Unit::TestCase
t.puts " end"
t.flush
assert_in_out_err(["-w", t.path], "", [], [], '[ruby-core:25442]')
+
+ err = ["#{t.path}:2: warning: mismatched indentations at 'end' with 'begin' at 1"]
+ t.rewind
+ t.truncate(0)
+ t.print "\u{feff}"
+ t.puts "begin"
+ t.puts " end"
+ t.flush
+ assert_in_out_err(["-w", t.path], "", [], err)
+ assert_in_out_err(["-wr", t.path, "-e", ""], "", [], err)
}
end