aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/collections.nom2
-rw-r--r--tests/colors.nom2
-rw-r--r--tests/control_flow.nom45
-rw-r--r--tests/coroutines.nom2
-rw-r--r--tests/errors.nom2
-rw-r--r--tests/inner/inner.nom4
-rw-r--r--tests/math.nom2
-rw-r--r--tests/metaprogramming.nom4
-rw-r--r--tests/object.nom2
-rw-r--r--tests/operators.nom4
-rw-r--r--tests/os.nom2
-rw-r--r--tests/scopes.nom2
-rw-r--r--tests/text.nom5
13 files changed, 37 insertions, 41 deletions
diff --git a/tests/collections.nom b/tests/collections.nom
index cf60ebe..f8b813f 100644
--- a/tests/collections.nom
+++ b/tests/collections.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V2.3.4.3
+#!/usr/bin/env nomsu -V2.4.4.3
#..
Tests for the stuff defined in core/control_flow.nom
use "core"
diff --git a/tests/colors.nom b/tests/colors.nom
index d4d5ac5..da1b2e3 100644
--- a/tests/colors.nom
+++ b/tests/colors.nom
@@ -1,3 +1,3 @@
-#!/usr/bin/env nomsu -V2.3.4.3
+#!/usr/bin/env nomsu -V2.4.4.3
use "lib/consolecolor.nom"
say (bright (green "Color test passed.")) \ No newline at end of file
diff --git a/tests/control_flow.nom b/tests/control_flow.nom
index 1d223a4..6312d77 100644
--- a/tests/control_flow.nom
+++ b/tests/control_flow.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V2.3.4.3
+#!/usr/bin/env nomsu -V2.4.4.3
#
Tests for the stuff defined in core/control_flow.nom
@@ -107,37 +107,35 @@ for %key = %value in {x: 1, y: 2}:
do next %value
barf "skipping value failed"
-action [barfer] (barf "this should never be reached")
-when:
- * (no) (barf "'when' fail")
- * (no)
- * (3 > 4) (barf "'when' fail 2")
- * (yes)
- * (barfer) (do nothing)
- * (99 > 1) (barf "Fell through incorrectly")
+action [barfer]: barf "this should never be reached"
+if:
+ (no): barf "'when' fail"
+ (no) (3 > 4): barf "'when' fail 2"
+ (yes) (barfer): do nothing
+ (99 > 1): barf "Fell through incorrectly"
%else_worked = (no)
-when:
- * (no) (barf)
- *else (%else_worked = (yes))
+if:
+ (no): barf
+ else: %else_worked = (yes)
+
+
assume %else_worked or barf "when..else failed"
-action [test when scope] (when (* (yes) (%leaked = (yes))))
+action [test when scope]:
+ if (yes): %leaked = (yes)
test when scope
assume (not %leaked) or barf "'when' is leaking locals"
%when_worked = (no)
-when 4 = ?:
- * 1
- * 2 (barf "'when = ?' fail")
- * 3
- * 4
- * (barfer) (%when_worked = (yes))
+if 4 is:
+ 1 2: barf "'when = ?' fail"
+ 3 4 (barfer): %when_worked = (yes)
assume %when_worked
%when_worked = (no)
-when 5 = ?:
- * 6 (barf)
- *else (%when_worked = (yes))
+if 5 is:
+ 6: barf
+ else: %when_worked = (yes)
assume %when_worked
%x = 1
@@ -149,8 +147,7 @@ assume (..)
%n = 0
for % in [1, 2, 3]: %n += %
return %n
- ..== 6
-
+ .. == 6
%t = [1, [2, [[3], 4], 5, [[[6]]]]]
%flat = []
for % in recursive %t:
diff --git a/tests/coroutines.nom b/tests/coroutines.nom
index 54b233e..a67e1c8 100644
--- a/tests/coroutines.nom
+++ b/tests/coroutines.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V2.3.4.3
+#!/usr/bin/env nomsu -V2.4.4.3
#
Tests for the stuff defined in core/control_flow.nom
diff --git a/tests/errors.nom b/tests/errors.nom
index 7f91c88..af918a6 100644
--- a/tests/errors.nom
+++ b/tests/errors.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V2.3.4.3
+#!/usr/bin/env nomsu -V2.4.4.3
#
Tests for the stuff defined in core/errors.nom
diff --git a/tests/inner/inner.nom b/tests/inner/inner.nom
index a4341f0..903e0c0 100644
--- a/tests/inner/inner.nom
+++ b/tests/inner/inner.nom
@@ -1,3 +1,3 @@
-#!/usr/bin/env nomsu -V1
+#!/usr/bin/env nomsu -V2.4.4.3
use "core"
-say "Inner directory 'use' test passed."
+say "Inner directory 'use' test passed." \ No newline at end of file
diff --git a/tests/math.nom b/tests/math.nom
index 7ddefba..f740315 100644
--- a/tests/math.nom
+++ b/tests/math.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V2.3.4.3
+#!/usr/bin/env nomsu -V2.4.4.3
#..
Tests for the stuff defined in core/control_flow.nom
use "core"
diff --git a/tests/metaprogramming.nom b/tests/metaprogramming.nom
index d74542c..b8dfde0 100644
--- a/tests/metaprogramming.nom
+++ b/tests/metaprogramming.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V2.3.4.3
+#!/usr/bin/env nomsu -V2.4.4.3
#
Tests for the stuff defined in core/metaprogramming.nom
@@ -68,4 +68,4 @@ lua> %code
assume (=lua "global_x") or barf "Running lua from a variable failed."
%code = (Lua value "global_x")
assume (=lua %code) or barf "Running lua from a variable failed."
-say "Metaprogramming test passed."
+say "Metaprogramming test passed." \ No newline at end of file
diff --git a/tests/object.nom b/tests/object.nom
index 30cf748..186957d 100644
--- a/tests/object.nom
+++ b/tests/object.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V2.3.4.3
+#!/usr/bin/env nomsu -V2.4.4.3
#
Tests for the object model defined in lib/object.nom
diff --git a/tests/operators.nom b/tests/operators.nom
index 0ab44c1..a8f7bfd 100644
--- a/tests/operators.nom
+++ b/tests/operators.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V2.3.4.3
+#!/usr/bin/env nomsu -V2.4.4.3
#..
Tests for the stuff defined in core/operators.nom
use "core"
@@ -69,4 +69,4 @@ assume (%x == 2) or barf "+<- failed"
assume (%x == 4) or barf "*<- failed"
wrap %x around 3
assume (%x == 1) or barf "wrap around failed"
-say "Operator test passed."
+say "Operator test passed." \ No newline at end of file
diff --git a/tests/os.nom b/tests/os.nom
index cbda5b3..c96306b 100644
--- a/tests/os.nom
+++ b/tests/os.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V2.3.4.3
+#!/usr/bin/env nomsu -V2.4.4.3
#
Tests for the stuff defined in lib/os.nom
diff --git a/tests/scopes.nom b/tests/scopes.nom
index a882dcb..4d20dd7 100644
--- a/tests/scopes.nom
+++ b/tests/scopes.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V2.3.4.3
+#!/usr/bin/env nomsu -V2.4.4.3
use "core"
%x = "outer"
with local %x:
diff --git a/tests/text.nom b/tests/text.nom
index 316b343..a002445 100644
--- a/tests/text.nom
+++ b/tests/text.nom
@@ -1,4 +1,4 @@
-#!/usr/bin/env nomsu -V2.3.4.3
+#!/usr/bin/env nomsu -V2.4.4.3
#..
Tests for the stuff defined in core/text.nom
use "core"
@@ -40,10 +40,9 @@ assume (..)
..== "one\ntwo"
assume ("nogap" == "nogap")
+
#comment
#
block comment
-
-
say "Text test passed." \ No newline at end of file