summaryrefslogtreecommitdiffhomepage
path: root/test
diff options
context:
space:
mode:
authorYukihiro "Matz" Matsumoto <[email protected]>2019-01-26 22:34:05 +0900
committerGitHub <[email protected]>2019-01-26 22:34:05 +0900
commit8a988643e84d290777a00907e3db1f8ca8940b05 (patch)
tree7a0ef36da2d13f009f6626b3c3356e88f4279bd4 /test
parenta03e7214089d5c119ec157a6bdfe268b2e0dbf6d (diff)
parent6d5a62cf5fc8b2e34c86042db9362aa81206fb81 (diff)
downloadmruby-8a988643e84d290777a00907e3db1f8ca8940b05.tar.gz
mruby-8a988643e84d290777a00907e3db1f8ca8940b05.zip
Merge pull request #4241 from shuujii/fix-tests-for-string-reverse-with-mrb-utf8-string
Fix tests for `String#reverse` with `MRB_UTF8_STRING`
Diffstat (limited to 'test')
-rw-r--r--test/t/string.rb11
1 files changed, 5 insertions, 6 deletions
diff --git a/test/t/string.rb b/test/t/string.rb
index e0f0eb99c..7f81c9335 100644
--- a/test/t/string.rb
+++ b/test/t/string.rb
@@ -464,12 +464,11 @@ assert('String#reverse', '15.2.10.5.29') do
end
assert('String#reverse(UTF-8)', '15.2.10.5.29') do
- assert_equal "ち", "こんにちは世界"[3]
- assert_equal nil, "こんにちは世界"[20]
- assert_equal "世", "こんにちは世界"[-2]
- assert_equal "世界", "こんにちは世界"[-2..-1]
- assert_equal "んに", "こんにちは世界"[1,2]
- assert_equal "世", "こんにちは世界"["世"]
+ a = 'こんにちは世界!'
+ a.reverse
+
+ assert_equal 'こんにちは世界!', a
+ assert_equal '!界世はちにんこ', 'こんにちは世界!'.reverse
end if UTF8STRING
assert('String#reverse!', '15.2.10.5.30') do