summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorflywind <xzsflywind@gmail.com>2021-06-21 18:50:47 +0800
committerGitHub <noreply@github.com>2021-06-21 12:50:47 +0200
commit2deb7011f5388559a70617c398360639102724c4 (patch)
tree43178b67b2d2f6e68b5a828fe4131287f90c2edb /tests
parentad70a65e0e3eda39a3ca074af9feadb68f10598f (diff)
downloadNim-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.nim9
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é"