diff options
| author | ruki <[email protected]> | 2026-01-21 00:49:57 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2026-01-21 00:49:57 +0800 |
| commit | ae8b2c49195e4f9e28f8ab06f8169e1bca68d1fc (patch) | |
| tree | e62b203fa40d090996f3c6f4496f140237bd4f38 /tests/modules/utf8/test.lua | |
| parent | f10baca5c10b1d21c6d9900ad3d6b382c37258c6 (diff) | |
add utf8.reverse
Diffstat (limited to 'tests/modules/utf8/test.lua')
| -rw-r--r-- | tests/modules/utf8/test.lua | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/tests/modules/utf8/test.lua b/tests/modules/utf8/test.lua index 329672d50..f7c8dbd2e 100644 --- a/tests/modules/utf8/test.lua +++ b/tests/modules/utf8/test.lua @@ -179,3 +179,9 @@ function test_byte(t) t:are_equal({utf8.byte("ABC", 4)}, {}) t:are_equal({utf8.byte("ABC", 1, 0)}, {}) end + +function test_reverse(t) + t:are_equal(utf8.reverse("hello"), "olleh") + t:are_equal(utf8.reverse("你好"), "好你") + t:are_equal(utf8.reverse("hello 你好"), "好你 olleh") +end |
