diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/if-else/buildfile | 26 | ||||
-rw-r--r-- | tests/if-else/test.out | 3 |
2 files changed, 27 insertions, 2 deletions
diff --git a/tests/if-else/buildfile b/tests/if-else/buildfile index a54092d..25fabf0 100644 --- a/tests/if-else/buildfile +++ b/tests/if-else/buildfile @@ -104,8 +104,6 @@ if! $f print 1 } -./: - # With eval context. # if (foo == foo) @@ -128,8 +126,32 @@ if ([uint64] 01 == [uint64] 1) print 1 } +# Single line. +# + +#if true +#} # expected if-line + +if true + print 1 + +if false + + print 0 +else + # Comment. + print 1 + +if true + if false + print 0 + else + print 1 + # EOF test. # +./: + if true { print 1 diff --git a/tests/if-else/test.out b/tests/if-else/test.out index 71c9a23..58501cb 100644 --- a/tests/if-else/test.out +++ b/tests/if-else/test.out @@ -11,3 +11,6 @@ 1 1 1 +1 +1 +1 |