diff options
Diffstat (limited to 'test')
| -rw-r--r-- | test/optionals.tm | 2 | ||||
| -rw-r--r-- | test/paths.tm | 4 | ||||
| -rw-r--r-- | test/when.tm | 9 |
3 files changed, 6 insertions, 9 deletions
diff --git a/test/optionals.tm b/test/optionals.tm index 5344848d..36f38625 100644 --- a/test/optionals.tm +++ b/test/optionals.tm @@ -259,7 +259,7 @@ func main() = 5 do - >> value := if var : Int? = none + >> value := if var : Int? = none then var else 0 diff --git a/test/paths.tm b/test/paths.tm index 700a0393..7685d089 100644 --- a/test/paths.tm +++ b/test/paths.tm @@ -29,7 +29,7 @@ func main() >> tmpdir.files().has(tmpfile) = yes - if tmp_lines := tmpfile.by_line() + if tmp_lines := tmpfile.by_line() then >> [line for line in tmp_lines] = ["Hello world!"] else @@ -39,7 +39,7 @@ func main() = none >> (./does-not-exist.xxx).read_bytes() = none - if lines := (./does-not-exist.xxx).by_line() + if lines := (./does-not-exist.xxx).by_line() then fail("I could read lines in a nonexistent file") else pass diff --git a/test/when.tm b/test/when.tm index 28573d88..d18f5276 100644 --- a/test/when.tm +++ b/test/when.tm @@ -3,12 +3,9 @@ func main() answers := [ ( - when x is "A","B" - "A or B" - is "C" - "C" - else - "Other" + when x is "A","B" then "A or B" + is "C" then "C" + else "Other" ) for x in ["A", "B", "C", "D"] ] >> answers |
