summary refs log tree commit diff stats
path: root/testament
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 /testament
parentca394ebd9514edd6e5f5e5c3d3145aa868744647 (diff)
downloadNim-1105d0364401226a2d7d479bd89d77a9da9ed787.tar.gz
require errormsg to be specified before file.
Diffstat (limited to 'testament')
-rw-r--r--testament/categories.nim35
-rw-r--r--testament/specs.nim6
2 files changed, 30 insertions, 11 deletions
diff --git a/testament/categories.nim b/testament/categories.nim
index 3d7b6a7d7..6ab14a2cf 100644
--- a/testament/categories.nim
+++ b/testament/categories.nim
@@ -299,17 +299,28 @@ proc testNimInAction(r: var TResults, cat: Category, options: string) =
   # edit when making a conscious breaking change, also please try to make your
   # commit message clear and notify me so I can easily compile an errata later.
   const refHashes = @[
-    "51afdfa84b3ca3d810809d6c4e5037ba", "30f07e4cd5eaec981f67868d4e91cfcf",
-    "d14e7c032de36d219c9548066a97e846", "2e40bfd5daadb268268727da91bb4e81",
-    "c5d3853ed0aba04bf6d35ba28a98dca0", "058603145ff92d46c009006b06e5b228",
-    "7b94a029b94ddb7efafddd546c965ff6", "586d74514394e49f2370dfc01dd9e830",
-    "13febc363ed82585f2a60de40ddfefda", "c11a013db35e798f44077bc0763cc86d",
-    "3e32e2c5e9a24bd13375e1cd0467079c", "0b9fe7ba159623d49ae60db18a15037c",
-    "b2dd5293d7f784824bbf9792c6fb51ad", "4c19d8d9026bfe151b31d7007fa3c237",
-    "9415c6a568cfceed08da8378e95b5cd5", "da520038c153f4054cb8cc5faa617714",
-    "e6c6e061b6f77b2475db6fec7abfb7f4", "9a8fe78c588d08018843b64b57409a02",
-    "8b5d28e985c0542163927d253a3e4fc9", "783299b98179cc725f9c46b5e3b5381f",
-    "bc523f9a9921299090bac1af6c958e73", "80f9c3e594a798225046e8a42e990daf"
+    "51afdfa84b3ca3d810809d6c4e5037ba",
+    "30f07e4cd5eaec981f67868d4e91cfcf",
+    "d14e7c032de36d219c9548066a97e846",
+    "b335635562ff26ec0301bdd86356ac0c",
+    "6c4add749fbf50860e2f523f548e6b0e",
+    "76de5833a7cc46f96b006ce51179aeb1",
+    "705eff79844e219b47366bd431658961",
+    "a1e87b881c5eb161553d119be8b52f64",
+    "13febc363ed82585f2a60de40ddfefda",
+    "c11a013db35e798f44077bc0763cc86d",
+    "3e32e2c5e9a24bd13375e1cd0467079c",
+    "0b9fe7ba159623d49ae60db18a15037c",
+    "b2dd5293d7f784824bbf9792c6fb51ad",
+    "4c19d8d9026bfe151b31d7007fa3c237",
+    "9415c6a568cfceed08da8378e95b5cd5",
+    "da520038c153f4054cb8cc5faa617714",
+    "e6c6e061b6f77b2475db6fec7abfb7f4",
+    "9a8fe78c588d08018843b64b57409a02",
+    "8b5d28e985c0542163927d253a3e4fc9",
+    "783299b98179cc725f9c46b5e3b5381f",
+    "bc523f9a9921299090bac1af6c958e73",
+    "80f9c3e594a798225046e8a42e990daf",
   ]
 
   for i, test in tests:
@@ -317,6 +328,8 @@ proc testNimInAction(r: var TResults, cat: Category, options: string) =
     let testHash = getMD5(readFile(filename).string)
     doAssert testHash == refHashes[i], "Nim in Action test " & filename & " was changed."
 
+
+
   # Run the tests.
   for testfile in tests:
     test "tests/" & testfile & ".nim"
diff --git a/testament/specs.nim b/testament/specs.nim
index 3583166fe..6c9fafa13 100644
--- a/testament/specs.nim
+++ b/testament/specs.nim
@@ -143,10 +143,16 @@ proc parseSpec*(filename: string): TSpec =
         else:
           result.parseErrors.addLine "cannot interpret as action: ", e.value
       of "file":
+        if result.msg.len == 0 and result.nimout.len == 0:
+          result.parseErrors.addLine "errormsg or msg needs to be specified before file"
         result.file = e.value
       of "line":
+        if result.msg.len == 0 and result.nimout.len == 0:
+          result.parseErrors.addLine "errormsg, msg or nimout needs to be specified before line"
         discard parseInt(e.value, result.line)
       of "column":
+        if result.msg.len == 0 and result.nimout.len == 0:
+          result.parseErrors.addLine "errormsg or msg needs to be specified before column"
         discard parseInt(e.value, result.column)
       of "tfile":
         result.tfile = e.value