Merge pull request #4538 from shuujii/use-__ENCODING__-in-tests

Use `__ENCODING__` in tests
This commit is contained in:
Yukihiro "Matz" Matsumoto
2019-06-28 20:08:52 +09:00
committed by GitHub
3 changed files with 3 additions and 3 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
##
# String(Ext) Test
UTF8STRING = ("\343\201\202".size == 1)
UTF8STRING = __ENCODING__ == "UTF-8"
assert('String#getbyte') do
str1 = "hello"
+1 -1
View File
@@ -14,7 +14,7 @@ end
assert("Symbol##{n}") do
assert_equal 5, :hello.__send__(n)
assert_equal 4, :"aA\0b".__send__(n)
if "".size == 1 # enable MRB_UTF8_STRING?
if __ENCODING__ == "UTF-8"
assert_equal 8, :"こんにちは世界!".__send__(n)
assert_equal 4, :"aあ\0b".__send__(n)
else
+1 -1
View File
@@ -2,7 +2,7 @@
##
# String ISO Test
UTF8STRING = ("\343\201\202".size == 1)
UTF8STRING = __ENCODING__ == "UTF-8"
assert('String', '15.2.10') do
assert_equal Class, String.class