diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2025-04-06 16:07:23 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2025-04-06 16:07:23 -0400 |
| commit | 6782cc5570e194791ca6cdd695b88897e9145564 (patch) | |
| tree | a428e9d954aca251212ec1cf15bd35e0badce630 /test/paths.tm | |
| parent | 448e805293989b06e07878a4a87fdd378f7c6e02 (diff) | |
No more colons for blocks
Diffstat (limited to 'test/paths.tm')
| -rw-r--r-- | test/paths.tm | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/paths.tm b/test/paths.tm index 85f9b191..700a0393 100644 --- a/test/paths.tm +++ b/test/paths.tm @@ -1,5 +1,5 @@ # Tests for file paths -func main(): +func main() >> (/).exists() = yes >> (~/).exists() @@ -29,19 +29,19 @@ func main(): >> tmpdir.files().has(tmpfile) = yes - if tmp_lines := tmpfile.by_line(): + if tmp_lines := tmpfile.by_line() >> [line for line in tmp_lines] = ["Hello world!"] - else: + else fail("Couldn't read lines in $tmpfile") >> (./does-not-exist.xxx).read() = none >> (./does-not-exist.xxx).read_bytes() = none - if lines := (./does-not-exist.xxx).by_line(): + if lines := (./does-not-exist.xxx).by_line() fail("I could read lines in a nonexistent file") - else: + else pass >> tmpfile.remove() |
