summary refs log tree commit diff stats
path: root/tests/arc
diff options
context:
space:
mode:
Diffstat (limited to 'tests/arc')
-rw-r--r--tests/arc/topenarray.nim24
1 files changed, 24 insertions, 0 deletions
diff --git a/tests/arc/topenarray.nim b/tests/arc/topenarray.nim
new file mode 100644
index 000000000..03ec7adf2
--- /dev/null
+++ b/tests/arc/topenarray.nim
@@ -0,0 +1,24 @@
+discard """
+  input: "hi"
+  output: '''
+hi
+Nim
+'''
+  matrix: "--gc:arc -d:useMalloc; --gc:arc"
+"""
+block: # bug 18627
+  proc setPosition(params: openArray[string]) =
+    for i in params.toOpenArray(0, params.len - 1):
+      echo i
+
+  proc uciLoop() =
+    let params = @[readLine(stdin)]
+    setPosition(params)
+
+  uciLoop()
+
+  proc uciLoop2() =
+    let params = @["Nim"]
+    for i in params.toOpenArray(0, params.len - 1):
+      echo i
+  uciLoop2()