diff options
Diffstat (limited to 'test/ruby')
-rw-r--r-- | test/ruby/test_io_m17n.rb | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/test/ruby/test_io_m17n.rb b/test/ruby/test_io_m17n.rb index ea68219184..63eb4b7d88 100644 --- a/test/ruby/test_io_m17n.rb +++ b/test/ruby/test_io_m17n.rb @@ -2082,6 +2082,19 @@ EOT } end + def test_bom_too_long_utfname + assert_separately([], <<-'end;') # do + assert_warn(/Unsupported encoding/) { + open(IO::NULL, "r:bom|utf-" + "x" * 10000) {} + } + end; + assert_separately([], <<-'end;') # do + assert_warn(/Unsupported encoding/) { + open(IO::NULL, encoding: "bom|utf-" + "x" * 10000) {} + } + end; + end + def test_cbuf with_tmpdir { fn = "tst" |