aboutsummaryrefslogtreecommitdiff
path: root/test/paths.tm
diff options
context:
space:
mode:
authorBruce Hill <bruce@bruce-hill.com>2025-07-11 16:05:54 -0400
committerBruce Hill <bruce@bruce-hill.com>2025-07-11 16:05:54 -0400
commit4153c0af9d4dcc43c0a67cc446a313c46ee5ac33 (patch)
tree246154cdf41f487f6d2da2c6b6df5aba50531ab6 /test/paths.tm
parenta51d48201b5245dc2cc2bfb00e0ac8e7b52203d9 (diff)
parent46b0dbc5a448249ddc9a6ce20465f0fa41de6d64 (diff)
Merge branch 'main' into decimalsdecimals
Diffstat (limited to 'test/paths.tm')
-rw-r--r--test/paths.tm12
1 files changed, 4 insertions, 8 deletions
diff --git a/test/paths.tm b/test/paths.tm
index 14a15299..d92d4623 100644
--- a/test/paths.tm
+++ b/test/paths.tm
@@ -1,9 +1,7 @@
# Tests for file paths
func main()
- >> (/).exists()
- = yes
- >> (~/).exists()
- = yes
+ assert (/).exists()
+ assert (~/).exists()
>> (~/Downloads/file(1).txt)
= (~/Downloads/file(1).txt)
@@ -16,8 +14,7 @@ func main()
= (~/example.txt)
>> tmpdir := (/tmp/tomo-test-path-XXXXXX).unique_directory()
- >> (/tmp).subdirectories().has(tmpdir)
- = yes
+ assert (/tmp).subdirectories().has(tmpdir)
>> tmpfile := (tmpdir++(./one.txt))
>> tmpfile.write("Hello world")
@@ -26,8 +23,7 @@ func main()
= "Hello world!"?
>> tmpfile.read_bytes()!
= [0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x77, 0x6F, 0x72, 0x6C, 0x64, 0x21]
- >> tmpdir.files().has(tmpfile)
- = yes
+ assert tmpdir.files().has(tmpfile)
if tmp_lines := tmpfile.by_line() then
>> [line for line in tmp_lines]