diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/ruby/test_pack.rb | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/test/ruby/test_pack.rb b/test/ruby/test_pack.rb index 59edc3eb4b..5d2b656058 100644 --- a/test/ruby/test_pack.rb +++ b/test/ruby/test_pack.rb @@ -718,5 +718,13 @@ EXPECTED assert_warning(/unknown pack directive ',' in ','/) { [].pack(",") } + assert_warning(/\A[ -~]+\Z/) { + [].pack("\x7f") + } + assert_warning(/\A(.* in '\u{3042}'\n)+\z/) { + EnvUtil.with_default_external(Encoding::UTF_8) { + [].pack("\u{3042}") + } + } end end |