mirror of
https://github.com/ruby/ruby.git
synced 2025-09-17 09:33:59 +02:00
[Bug #18956] Negative codepoints are invalid characters
This commit is contained in:
parent
8f4a53d051
commit
d2483393cb
Notes:
git
2022-08-20 10:06:37 +09:00
2 changed files with 3 additions and 2 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue