diff options
author | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-07-24 14:24:18 +0900 |
---|---|---|
committer | Nobuyoshi Nakada <nobu@ruby-lang.org> | 2021-07-24 14:31:41 +0900 |
commit | eec45a93effe69a821960839760b9e39be1ebc63 (patch) | |
tree | 0f3ab0bab09728300ecd9ffcef6179d9ce6f9661 /test/-ext-/test_printf.rb | |
parent | 8cc18703cfa7ff88b6ca51267e557fa2658a78fb (diff) |
Escape unprintable chars only, without surrounding quotes
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/4676
Diffstat (limited to 'test/-ext-/test_printf.rb')
-rw-r--r-- | test/-ext-/test_printf.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/-ext-/test_printf.rb b/test/-ext-/test_printf.rb index cfec388e8c..c2b50285b9 100644 --- a/test/-ext-/test_printf.rb +++ b/test/-ext-/test_printf.rb @@ -21,11 +21,11 @@ class Test_SPrintf < Test::Unit::TestCase end def test_quote - assert_equal('["\n"]', Bug::Printf.q("\n")) + assert_equal('[\n]', Bug::Printf.q("\n")) assert_equal('[aaa]', Bug::Printf.q('aaa')) assert_equal('[a a]', Bug::Printf.q('a a')) assert_equal('[]', Bug::Printf.q('')) - assert_equal('[""]', Bug::Printf.q(:'')) + assert_equal('[]', Bug::Printf.q(:'')) end def test_encoding |