summary refs log tree commit diff stats
path: root/tests/accept/run/tsplit.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/accept/run/tsplit.nim')
-rw-r--r--tests/accept/run/tsplit.nim14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/accept/run/tsplit.nim b/tests/accept/run/tsplit.nim
new file mode 100644
index 000000000..711696b9e
--- /dev/null
+++ b/tests/accept/run/tsplit.nim
@@ -0,0 +1,14 @@
+import strutils
+
+var s = ""
+for w in split("|abc|xy|z", {'|'}):
+  s.add("#")
+  s.add(w)
+
+if s == "#abc#xy#z":
+  echo "true"
+else:
+  echo "false"
+  
+#OUT true
+