From 19c8450aa0a9ea008a3e5fd4ec44f7c3761db663 Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 7 Dec 2025 22:53:45 -0500 Subject: Switch paths to use Result return values instead of fail() --- test/paths.tm | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'test') 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:") -- cgit v1.2.3