summary refs log tree commit diff stats
path: root/tests
diff options
context:
space:
mode:
authorAndreas Rumpf <andreas@andreas-desktop>2010-03-20 11:00:30 +0100
committerAndreas Rumpf <andreas@andreas-desktop>2010-03-20 11:00:30 +0100
commit7d6de1cf90858700733091b9a592b2fac7549af5 (patch)
tree167b22158117fd736deeeb0584884c4b5a059a40 /tests
parentc5d8a5c1da9618d65ff08cb0ab6b084e07493b49 (diff)
downloadNim-7d6de1cf90858700733091b9a592b2fac7549af5.tar.gz
Bugfix: strutils.delete
Diffstat (limited to 'tests')
-rwxr-xr-xtests/accept/run/tstrutil.nim11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/accept/run/tstrutil.nim b/tests/accept/run/tstrutil.nim
index affe6e58d..0488d1dc7 100755
--- a/tests/accept/run/tstrutil.nim
+++ b/tests/accept/run/tstrutil.nim
@@ -10,6 +10,17 @@ proc main() =
   testStrip()

   for p in split("/home/a1:xyz:/usr/bin", {':'}):

     write(stdout, p)

+
+proc testDelete = 
+  var s = "0123456789ABCDEFGH"
+  delete(s, 4, 5)
+  assert s == "01236789ABCDEFGH"
+  delete(s, s.len-1, s.len-1)
+  assert s == "01236789ABCDEFG"
+  delete(s, 0, 0)
+  assert s == "1236789ABCDEFG"
+
+testDelete()  
     

 assert(insertSep($1000_000) == "1_000_000")
 assert(insertSep($232) == "232")