summary refs log tree commit diff stats
path: root/tests/js/tstringitems.nim
diff options
context:
space:
mode:
Diffstat (limited to 'tests/js/tstringitems.nim')
-rw-r--r--tests/js/tstringitems.nim10
1 files changed, 9 insertions, 1 deletions
diff --git a/tests/js/tstringitems.nim b/tests/js/tstringitems.nim
index f09793dde..16df04149 100644
--- a/tests/js/tstringitems.nim
+++ b/tests/js/tstringitems.nim
@@ -1,6 +1,9 @@
 discard """
   output: '''Hello
-Hello'''
+Hello
+c
+d
+e'''
 """
 
 block: # bug #2581
@@ -85,3 +88,8 @@ block: # String cmp
   doAssert(cmp("foo", "foobar") == -3)
   doAssert(cmp("fooz", "foog") == 19)
   doAssert(cmp("foog", "fooz") == -19)
+
+proc main(x: openArray[char]) =
+  for c in x: echo c
+
+main(toOpenArray(['a', 'b', 'c', 'd', 'e'], 2, 4))