diff options
| author | Bruce Hill <bruce@bruce-hill.com> | 2024-09-09 02:43:15 -0400 |
|---|---|---|
| committer | Bruce Hill <bruce@bruce-hill.com> | 2024-09-09 02:43:15 -0400 |
| commit | a306f945571c8027badd2ca673304991f628900c (patch) | |
| tree | 328f8c57bec5e0b71d7c589213badb3b4d03b39c /test/paths.tm | |
| parent | 1fbe2cb5dd1aa4b20411ee0c3b00310677373a55 (diff) | |
Add mktemp functionality
Diffstat (limited to 'test/paths.tm')
| -rw-r--r-- | test/paths.tm | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/test/paths.tm b/test/paths.tm new file mode 100644 index 00000000..bc85c31a --- /dev/null +++ b/test/paths.tm @@ -0,0 +1,26 @@ +# Tests for file paths +func main(): + >> (/):exists() + = yes + >> (~/):exists() + = yes + + >> tmpdir := (/tmp/tomo-test-path-XXXXXX):unique_directory() + >> (/tmp):subdirectories():has(tmpdir) + = yes + + >> tmpfile := (tmpdir++(./one.txt)) + >> tmpfile:write("Hello world") + >> tmpfile:append("!") + >> tmpfile:read() + = "Hello world!" + >> tmpdir:files():has(tmpfile) + = yes + + >> tmpfile:remove() + + >> tmpdir:files():has(tmpfile) + = no + + >> tmpdir:remove() + |
