tests/fs.min
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 |
'min-test require :test ;;; "fs" *test/describe "TEST" "test.txt" fwrite ("test.txt" fsize 4 ==) *test/assert ("test.txt" fperms 644 >=) *test/assert ("test.txt" ftype "file" ==) *test/assert ("test.txt" hidden? false ==) *test/assert ("test.txt" fstats 'type dget "file" ==) *test/assert ("tests" dir?) *test/assert ("tests" exists?) *test/assert ("tests/fs.min" file?) *test/assert (("a" "b" "c") join-path "a/b/c" ==) *test/assert ("/home/h3rald" windows-path "\\home\\h3rald" ==) *test/assert ("/home/h3rald" absolute-path?) *test/assert ("tests/sys.min" expand-filename unix-path . "/tests/sys.min" suffix unix-path ==) *test/assert ("./../tests" normalized-path unix-path "../tests" ==) *test/assert ((. "tests/global.min") => join-path . relative-path unix-path "tests/global.min" ==) *test/assert ("tests/global.min" absolute-path unix-path (. "tests/global.min") => join-path unix-path ==) *test/assert ("./test" absolute-path? not) *test/assert ("c:/windows" windows-path "c:\\windows" ==) *test/assert *test/report clear-stack "test.txt" rm |