From addac10a47693a976808bf75fe63aed19f8dbb63 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 22 Jul 2018 15:01:05 -0700 Subject: Re-autoformatted everything. The main changes are: no longer adding a newline after 1-line indented code inside blocks, and forcing files to have a trailing newline. The trailing newline thing created a lot of spurious changes. --- tests/collections.nom | 2 +- tests/colors.nom | 2 +- tests/control_flow.nom | 6 +----- tests/coroutines.nom | 2 +- tests/errors.nom | 2 +- tests/inner/inner.nom | 2 +- tests/math.nom | 2 +- tests/metaprogramming.nom | 3 +-- tests/object.nom | 2 +- tests/operators.nom | 2 +- tests/os.nom | 2 +- tests/scopes.nom | 2 +- tests/text.nom | 2 +- 13 files changed, 13 insertions(+), 18 deletions(-) (limited to 'tests') diff --git a/tests/collections.nom b/tests/collections.nom index 660fd1b..f3af5b8 100644 --- a/tests/collections.nom +++ b/tests/collections.nom @@ -35,4 +35,4 @@ assume (%x == [3, 2, 1]) sort %x by % = %keys.% assume (%x == [2, 3, 1]) assume ((unique [1, 2, 1, 3, 2, 3]) == [1, 2, 3]) -say "Collections test passed." \ No newline at end of file +say "Collections test passed." diff --git a/tests/colors.nom b/tests/colors.nom index 042ba43..7f7d189 100644 --- a/tests/colors.nom +++ b/tests/colors.nom @@ -1,4 +1,4 @@ #!/usr/bin/env nomsu -V2.5.4.3 use "lib/consolecolor.nom" -say (bright (green "Color test passed.")) \ No newline at end of file +say (bright (green "Color test passed.")) diff --git a/tests/control_flow.nom b/tests/control_flow.nom index 7a6a743..72adc5a 100644 --- a/tests/control_flow.nom +++ b/tests/control_flow.nom @@ -9,10 +9,8 @@ action [test conditionals]: if (yes): %loc1 = (yes) if (no): barf "entered if 'no' conditional" - unless (yes): barf "entered unless 'yes' conditional" - if (yes): %loc2 = (yes) ..else: barf "entered if 'yes' else conditional" @@ -125,7 +123,6 @@ if: (no): barf "'when' fail" (no) (3 > 4): barf "'when' fail 2" - (yes) (barfer): do nothing (99 > 1): barf "Fell through incorrectly" @@ -146,7 +143,6 @@ assume (not %leaked) or barf "'when' is leaking locals" if 4 is: 1 2: barf "'when = ?' fail" - 3 4 (barfer): %when_worked = (yes) @@ -177,4 +173,4 @@ for % in recursive %t: ..else: add % to %flat assume ((sorted %flat) == [1, 2, 3, 4, 5, 6]) -say "Control flow test passed." \ No newline at end of file +say "Control flow test passed." diff --git a/tests/coroutines.nom b/tests/coroutines.nom index 288ba90..84d5eed 100644 --- a/tests/coroutines.nom +++ b/tests/coroutines.nom @@ -13,4 +13,4 @@ use "core" for % in coroutine %co (add % to %nums) assume (%nums == [4, 5, 6, 6, 6]) or barf "Coroutine iteration failed" -say "Coroutines test passed." \ No newline at end of file +say "Coroutines test passed." diff --git a/tests/errors.nom b/tests/errors.nom index 766225d..000ee3e 100644 --- a/tests/errors.nom +++ b/tests/errors.nom @@ -13,4 +13,4 @@ try: ..and if it barfs (do nothing) assume (%x == 3) or barf "do/then always failed" -say "Error handling test passed." \ No newline at end of file +say "Error handling test passed." diff --git a/tests/inner/inner.nom b/tests/inner/inner.nom index 5a4fc63..4981c7e 100644 --- a/tests/inner/inner.nom +++ b/tests/inner/inner.nom @@ -1,4 +1,4 @@ #!/usr/bin/env nomsu -V2.5.4.3 use "core" -say "Inner directory 'use' test passed." \ No newline at end of file +say "Inner directory 'use' test passed." diff --git a/tests/math.nom b/tests/math.nom index 48468ce..e3b64c1 100644 --- a/tests/math.nom +++ b/tests/math.nom @@ -18,4 +18,4 @@ assume ((463 to the nearest 100) == 500) or barf "rounding failed" assume ((2.6 to the nearest 0.25) == 2.5) or barf "rounding failed" assume ((min of [3, -4, 1, 2] by % = (% * %)) == 1) assume ((max of [3, -4, 1, 2] by % = (% * %)) == -4) -say "Math test passed" \ No newline at end of file +say "Math test passed" diff --git a/tests/metaprogramming.nom b/tests/metaprogramming.nom index 30c42ed..2165c92 100644 --- a/tests/metaprogramming.nom +++ b/tests/metaprogramming.nom @@ -60,7 +60,6 @@ swap %tmp and %tmp2 assume ((%tmp == 2) and (%tmp2 == 1)) or barf ".." 'parse % as %' variable mangling failed. - # remove action (foo %) try: foo 99 @@ -81,4 +80,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." \ No newline at end of file +say "Metaprogramming test passed." diff --git a/tests/object.nom b/tests/object.nom index d29fcdd..d942d12 100644 --- a/tests/object.nom +++ b/tests/object.nom @@ -45,4 +45,4 @@ as (new Corgi {barks:1}): assume ((bark) == "Bark!") or barf "inheritance failed" assume ((woof) == "Bark!") -say "Object test passed." \ No newline at end of file +say "Object test passed." diff --git a/tests/operators.nom b/tests/operators.nom index 6a9cced..2b55b3e 100644 --- a/tests/operators.nom +++ b/tests/operators.nom @@ -76,4 +76,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." \ No newline at end of file +say "Operator test passed." diff --git a/tests/os.nom b/tests/os.nom index c0a2403..4dd7680 100644 --- a/tests/os.nom +++ b/tests/os.nom @@ -10,4 +10,4 @@ assume (%lines.3 == " Tests for the stuff defined in lib/os.nom") %n = 0 for file %f in "core" (%n += 1) assume (%n > 0) or barf "Failed to walk the 'core' directory" -say "OS test passed." \ No newline at end of file +say "OS test passed." diff --git a/tests/scopes.nom b/tests/scopes.nom index 9af8383..f42fa9a 100644 --- a/tests/scopes.nom +++ b/tests/scopes.nom @@ -13,4 +13,4 @@ with local [action (foo)]: assume ((foo) == "inner foo") assume ((foo) == "outer foo") -say "Scopes test passed." \ No newline at end of file +say "Scopes test passed." diff --git a/tests/text.nom b/tests/text.nom index d680560..f6ccb36 100644 --- a/tests/text.nom +++ b/tests/text.nom @@ -48,4 +48,4 @@ assume ("nogap" == "nogap") # block comment -say "Text test passed." \ No newline at end of file +say "Text test passed." -- cgit v1.2.3