diff options
| author | KOBAYASHI Shuji <[email protected]> | 2019-10-10 19:50:48 +0900 |
|---|---|---|
| committer | KOBAYASHI Shuji <[email protected]> | 2019-10-10 19:50:48 +0900 |
| commit | 7ce5d3394706723a82d337641f960c58649e0134 (patch) | |
| tree | 56cfeabc2ed1c78b273613f99d7e3a0f57784a2a /test | |
| parent | 20aab8a10bc5e4b38b1e3d15a68e347b10db1e2e (diff) | |
| download | mruby-7ce5d3394706723a82d337641f960c58649e0134.tar.gz mruby-7ce5d3394706723a82d337641f960c58649e0134.zip | |
Integrate `mrb_str_inspect` and `mrb_str_dump`
Diffstat (limited to 'test')
| -rw-r--r-- | test/t/string.rb | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/test/t/string.rb b/test/t/string.rb index e1ff48312..65ad13103 100644 --- a/test/t/string.rb +++ b/test/t/string.rb @@ -748,12 +748,18 @@ assert('String#upcase!', '15.2.10.5.43') do end assert('String#inspect', '15.2.10.5.46') do + assert_equal "\"\\x00\"", "\0".inspect + assert_equal "\"foo\"", "foo".inspect + if UTF8STRING + assert_equal '"る"', "る".inspect + else + assert_equal '"\xe3\x82\x8b"', "る".inspect + end + # should not raise an exception - regress #1210 assert_nothing_raised do - ("\1" * 100).inspect + ("\1" * 100).inspect end - - assert_equal "\"\\x00\"", "\0".inspect end # Not ISO specified |
