diff options
author | flywind <xzsflywind@gmail.com> | 2021-06-21 18:50:47 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-21 12:50:47 +0200 |
commit | 2deb7011f5388559a70617c398360639102724c4 (patch) | |
tree | 43178b67b2d2f6e68b5a828fe4131287f90c2edb /tests | |
parent | ad70a65e0e3eda39a3ca074af9feadb68f10598f (diff) | |
download | Nim-2deb7011f5388559a70617c398360639102724c4.tar.gz |
fixes #17768 [backport:1.4] (#18317)
* fixes #17768 [backport:1.4] * tiny
Diffstat (limited to 'tests')
-rw-r--r-- | tests/stdlib/tunicode.nim | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/tests/stdlib/tunicode.nim b/tests/stdlib/tunicode.nim index a346106f9..33405cf38 100644 --- a/tests/stdlib/tunicode.nim +++ b/tests/stdlib/tunicode.nim @@ -1,4 +1,4 @@ -import unicode +import std/unicode proc asRune(s: static[string]): Rune = @@ -213,3 +213,10 @@ block differentSizes: doAssert swapCase("ⱥbCd") == "ȺBcD" doAssert swapCase("XyꟆaB") == "xYᶎAb" doAssert swapCase("aᵹcᲈd") == "AꝽCꙊD" + +block: # bug #17768 + let s1 = "abcdef" + let s2 = "abcdéf" + + doAssert s1.runeSubstr(0, -1) == "abcde" + doAssert s2.runeSubstr(0, -1) == "abcdé" |