mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
Test for UTF-8 as mattn suggests.
The string is "Hello world" in Japanese. (hat tip: Google Translate.)
This commit is contained in:
@@ -5,7 +5,7 @@ assert('Integer#chr') do
|
||||
assert_equal("A", 65.chr)
|
||||
assert_equal("B", 0x42.chr)
|
||||
|
||||
if 255.chr.bytes == [195, 191] then
|
||||
if "こんにちわ世界".size == 7 then
|
||||
# UTF-8 gem is configured
|
||||
assert_raise(RangeError) { 0x110000.chr }
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user