summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorAraq <rumpf_a@web.de>2017-01-31 22:54:58 +0100
committerAraq <rumpf_a@web.de>2017-01-31 22:54:58 +0100
commit5b32dafff474c95533ec14289ccb74a866aea526 (patch)
tree8858ce0ff79fa713691817ea06ee415ddb84d927
parentb3e55e532b3b06ba102e8c4f54c96157fe3bb469 (diff)
downloadNim-5b32dafff474c95533ec14289ccb74a866aea526.tar.gz
testament: OS specific disables
-rw-r--r--tests/float/tfloat6.nim1
-rw-r--r--tests/testament/specs.nim18
2 files changed, 18 insertions, 1 deletions
diff --git a/tests/float/tfloat6.nim b/tests/float/tfloat6.nim
index 721abd721..8e043a658 100644
--- a/tests/float/tfloat6.nim
+++ b/tests/float/tfloat6.nim
@@ -7,6 +7,7 @@ discard """
 1e-06 : 1e-06
 10.000001 : 10.000001
 100.000001 : 100.000001'''
+  disabled: "windows"
 """
 
 import strutils
diff --git a/tests/testament/specs.nim b/tests/testament/specs.nim
index b9519c70f..91e8b2ec7 100644
--- a/tests/testament/specs.nim
+++ b/tests/testament/specs.nim
@@ -154,7 +154,23 @@ proc parseSpec*(filename: string): TSpec =
     of "nimout":
       result.nimout = e.value
     of "disabled":
-      if parseCfgBool(e.value): result.err = reIgnored
+      case e.value.normalize
+      of "y", "yes", "true", "1", "on": result.err = reIgnored
+      of "n", "no", "false", "0", "off": discard
+      of "win", "windows":
+        when defined(windows): result.err = reIgnored
+      of "linux":
+        when defined(linux): result.err = reIgnored
+      of "bsd":
+        when defined(bsd): result.err = reIgnored
+      of "macosx":
+        when defined(macosx): result.err = reIgnored
+      of "unix":
+        when defined(unix): result.err = reIgnored
+      of "posix":
+        when defined(posix): result.err = reIgnored
+      else:
+        raise newException(ValueError, "cannot interpret as a bool: " & e.value)
     of "cmd":
       if e.value.startsWith("nim "):
         result.cmd = "compiler" / e.value