aboutsummaryrefslogtreecommitdiff
path: root/tests/errors.nom
diff options
context:
space:
mode:
authorBruce Hill <bitbucket@bruce-hill.com>2018-07-18 01:27:56 -0700
committerBruce Hill <bitbucket@bruce-hill.com>2018-07-18 01:28:17 -0700
commitd5cfaa37be9e278c44a25ef448a071390597306e (patch)
tree7fbe78b5153bb9c761c283533943ab80da3a1844 /tests/errors.nom
parentc7c657d38f999901225b33482ef3a15994526feb (diff)
Upgrading to version 2.3 (main change: "=" instead of "<-" for
assignment)
Diffstat (limited to 'tests/errors.nom')
-rw-r--r--tests/errors.nom29
1 files changed, 11 insertions, 18 deletions
diff --git a/tests/errors.nom b/tests/errors.nom
index 7f52532..7f91c88 100644
--- a/tests/errors.nom
+++ b/tests/errors.nom
@@ -1,23 +1,16 @@
-#!/usr/bin/env nomsu -V1
+#!/usr/bin/env nomsu -V2.3.4.3
#
Tests for the stuff defined in core/errors.nom
-try: barf
-..and if it succeeds: barf "try failed."
-
-%worked <- (no)
-try: barf
-..and if it barfs: %worked <- (yes)
+try (barf) and if it succeeds (barf "try failed.")
+%worked = (no)
+try (barf) and if it barfs (%worked = (yes))
assume %worked or barf "try/catch failed"
+%x = 1
+try:
+ %x = 2
+ do (barf) then always (%x = 3)
+..and if it barfs (do nothing)
-%x <- 1
-try
- %x <- 2
- do
- barf
- ..then always
- %x <- 3
-..and if it barfs: do nothing
-assume (%x = 3) or barf "do/then always failed"
-
-say "Error handling test passed."
+assume (%x == 3) or barf "do/then always failed"
+say "Error handling test passed." \ No newline at end of file