summary refs log tree commit diff stats
path: root/tests/actiontable
diff options
context:
space:
mode:
Diffstat (limited to 'tests/actiontable')
-rw-r--r--tests/actiontable/tactiontable.nim17
-rw-r--r--tests/actiontable/tactiontable2.nim27
2 files changed, 14 insertions, 30 deletions
diff --git a/tests/actiontable/tactiontable.nim b/tests/actiontable/tactiontable.nim
index 4560d0f7f..3f15a70bd 100644
--- a/tests/actiontable/tactiontable.nim
+++ b/tests/actiontable/tactiontable.nim
@@ -1,5 +1,8 @@
 discard """
-  output: "action 3 arg"
+  output: '''
+action 3 arg
+action 3 arg
+'''
 """
 
 import tables
@@ -17,10 +20,18 @@ proc action4(arg: string) =
   echo "action 4 ", arg
 
 var
-  actionTable = {
+  actionTable1 = {
     "A": action1,
     "B": action2,
     "C": action3,
     "D": action4}.toTable
 
-actionTable["C"]("arg")
+const
+  actionTable2 = {
+    "A": action1,
+    "B": action2,
+    "C": action3,
+    "D": action4}.toTable
+
+actionTable1["C"]("arg")
+actionTable2["C"]("arg")
diff --git a/tests/actiontable/tactiontable2.nim b/tests/actiontable/tactiontable2.nim
deleted file mode 100644
index fbc65a67d..000000000
--- a/tests/actiontable/tactiontable2.nim
+++ /dev/null
@@ -1,27 +0,0 @@
-discard """
-  output: "action 3 arg"
-"""
-
-import tables
-
-proc action1(arg: string) =
-  echo "action 1 ", arg
-
-proc action2(arg: string) =
-  echo "action 2 ", arg
-
-proc action3(arg: string) =
-  echo "action 3 ", arg
-
-proc action4(arg: string) =
-  echo "action 4 ", arg
-
-const
-  actionTable = {
-    "A": action1,
-    "B": action2,
-    "C": action3,
-    "D": action4}.toTable
-
-actionTable["C"]("arg")
-