aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-11 05:34:24 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-10-11 05:34:24 +0000
commit9067f775f09cbc92007227ce0b910ae09e5c4b9a (patch)
tree0602c9495d354ea5e574845980cd914fbb2de096 /test
parent2ee4cdab98562d67083049efc0f0ed2c39d7d27d (diff)
downloadruby-9067f775f09cbc92007227ce0b910ae09e5c4b9a.tar.gz
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/trunk@60160 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test')
-rw-r--r--test/ruby/test_rubyoptions.rb11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/ruby/test_rubyoptions.rb b/test/ruby/test_rubyoptions.rb
index 6b598162d8..f927af2f2d 100644
--- a/test/ruby/test_rubyoptions.rb
+++ b/test/ruby/test_rubyoptions.rb
@@ -450,6 +450,17 @@ class TestRubyOptions < Test::Unit::TestCase
t.flush
assert_in_out_err(["-w", t.path], "", [], [], '[ruby-core:25442]')
end
+
+ a.for("BOM with #{b}") do
+ err = ["#{t.path}:2: warning: mismatched indentations at '#{e}' with '#{k}' at 1"]
+ t.rewind
+ t.truncate(0)
+ t.print "\u{feff}"
+ t.puts src
+ t.flush
+ assert_in_out_err(["-w", t.path], "", [], err)
+ assert_in_out_err(["-wr", t.path, "-e", ""], "", [], err)
+ end
end
end
end