aboutsummaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/paths.tm10
1 files changed, 5 insertions, 5 deletions
diff --git a/test/paths.tm b/test/paths.tm
index d7630fc3..a0ae4384 100644
--- a/test/paths.tm
+++ b/test/paths.tm
@@ -17,8 +17,8 @@ func main()
assert optional_path == (./foo)
>> tmpfile := (tmpdir++(./one.txt))
- >> tmpfile.write("Hello world")
- >> tmpfile.append("!")
+ >> tmpfile.write("Hello world")!
+ >> tmpfile.append("!")!
assert tmpfile.read() == "Hello world!"
assert tmpfile.read_bytes()! == [0x48, 0x65, 0x6C, 0x6C, 0x6F, 0x20, 0x77, 0x6F, 0x72, 0x6C, 0x64, 0x21]
assert tmpdir.files().has(tmpfile)
@@ -35,11 +35,11 @@ func main()
else
pass
- >> tmpfile.remove()
+ >> tmpfile.remove()!
assert tmpdir.files().has(tmpfile) == no
- >> tmpdir.remove()
+ >> tmpdir.remove()!
>> p := (/foo/baz.x/qux.tar.gz)
assert p.base_name() == "qux.tar.gz"
@@ -59,12 +59,12 @@ func main()
assert (~/.foo.baz.qux).extension() == "baz.qux"
- assert (/).parent() == (/)
assert (~/x/.).parent() == (~)
assert (~/x).parent() == (~)
assert (.).parent() == (..)
assert (..).parent() == (../..)
assert (../foo).parent() == (..)
+ assert (/).parent() == none
# Concatenation tests:
say("Basic relative path concatenation:")