summaryrefslogtreecommitdiff
path: root/test/ruby
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-08-20 01:43:04 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-08-20 10:06:16 +0900
commitd2483393cbcb4dcfa0000fa8166bb7fa7ed9f7b4 (patch)
tree5db32cf5e09b6aaddf4161e37e81d4cd961a71b8 /test/ruby
parent8f4a53d0517a99e57060211a3efe2d7a9d5d06b2 (diff)
[Bug #18956] Negative codepoints are invalid characters
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/6259
Diffstat (limited to 'test/ruby')
-rw-r--r--test/ruby/test_sprintf.rb1
1 files changed, 1 insertions, 0 deletions
diff --git a/test/ruby/test_sprintf.rb b/test/ruby/test_sprintf.rb
index 618e67264a..803399fdb3 100644
--- a/test/ruby/test_sprintf.rb
+++ b/test/ruby/test_sprintf.rb
@@ -368,6 +368,7 @@ class TestSprintf < Test::Unit::TestCase
assert_equal(" " * (BSIZ - 1) + "a", sprintf(" " * (BSIZ - 1) + "%-1c", ?a))
assert_equal(" " * BSIZ + "a", sprintf("%#{ BSIZ + 1 }c", ?a))
assert_equal("a" + " " * BSIZ, sprintf("%-#{ BSIZ + 1 }c", ?a))
+ assert_raise(ArgumentError) { sprintf("%c", -1) }
end
def test_string