summary refs log tree commit diff stats
path: root/tests/parser
diff options
context:
space:
mode:
authorArne Döring <arne.doering@gmx.net>2018-11-29 16:07:51 +0100
committerAraq <rumpf_a@web.de>2018-12-11 21:23:21 +0100
commit1105d0364401226a2d7d479bd89d77a9da9ed787 (patch)
tree559160c7497208ca53fb05fc5e97ae03e12e4187 /tests/parser
parentca394ebd9514edd6e5f5e5c3d3145aa868744647 (diff)
downloadNim-1105d0364401226a2d7d479bd89d77a9da9ed787.tar.gz
require errormsg to be specified before file.
Diffstat (limited to 'tests/parser')
-rw-r--r--tests/parser/tdomulttest.nim4
-rw-r--r--tests/parser/tinvcolonlocation1.nim2
-rw-r--r--tests/parser/tinvcolonlocation2.nim2
-rw-r--r--tests/parser/tinvcolonlocation3.nim2
-rw-r--r--tests/parser/tinvwhen.nim4
-rw-r--r--tests/parser/toprprec.nim1
-rw-r--r--tests/parser/ttupleunpack.nim6
7 files changed, 6 insertions, 15 deletions
diff --git a/tests/parser/tdomulttest.nim b/tests/parser/tdomulttest.nim
index 418192ac8..9e1afd034 100644
--- a/tests/parser/tdomulttest.nim
+++ b/tests/parser/tdomulttest.nim
@@ -1,14 +1,14 @@
 discard """
-  file: "tdomulttest.nim"
   output: "555\ntest\nmulti lines\n99999999\nend"
-  disabled: true
 """
+
 proc foo(bar, baz: proc (x: int): int) =
   echo bar(555)
   echo baz(99999999)
 
 foo do (x: int) -> int:
   return x
+
 do (x: int) -> int:
   echo("test")
   echo("multi lines")
diff --git a/tests/parser/tinvcolonlocation1.nim b/tests/parser/tinvcolonlocation1.nim
index 2fddab2f8..7fca5deb7 100644
--- a/tests/parser/tinvcolonlocation1.nim
+++ b/tests/parser/tinvcolonlocation1.nim
@@ -1,8 +1,8 @@
 discard """
+  errormsg: "expected: ':', but got: 'echo'"
   file: "tinvcolonlocation1.nim"
   line: 8
   column: 7
-  errormsg: "expected: ':', but got: 'echo'"
 """
 try #<- missing ':'
   echo "try"
diff --git a/tests/parser/tinvcolonlocation2.nim b/tests/parser/tinvcolonlocation2.nim
index 4251598b9..e3de393b8 100644
--- a/tests/parser/tinvcolonlocation2.nim
+++ b/tests/parser/tinvcolonlocation2.nim
@@ -1,8 +1,8 @@
 discard """
+  errormsg: "expected: ':', but got: 'keyword finally'"
   file: "tinvcolonlocation2.nim"
   line: 11
   column: 8
-  errormsg: "expected: ':', but got: 'keyword finally'"
 """
 try:
   echo "try"
diff --git a/tests/parser/tinvcolonlocation3.nim b/tests/parser/tinvcolonlocation3.nim
index a8db658eb..46252f24e 100644
--- a/tests/parser/tinvcolonlocation3.nim
+++ b/tests/parser/tinvcolonlocation3.nim
@@ -1,8 +1,8 @@
 discard """
+  errormsg: "expected: ':', but got: 'echo'"
   file: "tinvcolonlocation3.nim"
   line: 12
   column: 7
-  errormsg: "expected: ':', but got: 'echo'"
 """
 try:
   echo "try"
diff --git a/tests/parser/tinvwhen.nim b/tests/parser/tinvwhen.nim
index 99701bdf5..7a47f69a4 100644
--- a/tests/parser/tinvwhen.nim
+++ b/tests/parser/tinvwhen.nim
@@ -1,7 +1,7 @@
 discard """
+  errormsg: "invalid indentation"
   file: "tinvwhen.nim"
   line: 11
-  errormsg: "invalid indentation"
 """
 # This was parsed even though it should not!
 
@@ -11,5 +11,3 @@ proc getcwd(buf: cstring, buflen: cint): cstring
     when defined(unix): {.importc: "getcwd", header: "<unistd.h>".} #ERROR_MSG invalid indentation
     elif defined(windows): {.importc: "getcwd", header: "<direct.h>"}
     else: {.error: "os library not ported to your OS. Please help!".}
-
-
diff --git a/tests/parser/toprprec.nim b/tests/parser/toprprec.nim
index 1acd381e7..363ad1c18 100644
--- a/tests/parser/toprprec.nim
+++ b/tests/parser/toprprec.nim
@@ -1,5 +1,4 @@
 discard """
-  file: "toprprec.nim"
   output: "done"
 """
 # Test operator precedence:
diff --git a/tests/parser/ttupleunpack.nim b/tests/parser/ttupleunpack.nim
index aaa06f9f4..c7ab9ea15 100644
--- a/tests/parser/ttupleunpack.nim
+++ b/tests/parser/ttupleunpack.nim
@@ -1,9 +1,3 @@
-discard """
-  file: "ttupleunpack.nim"
-  output: ""
-  exitcode: 0
-"""
-
 proc returnsTuple(): (int, int, int) = (4, 2, 3)
 
 proc main2 =