diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/function/path/testscript | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/tests/function/path/testscript b/tests/function/path/testscript index b0c97c9..142c866 100644 --- a/tests/function/path/testscript +++ b/tests/function/path/testscript @@ -49,6 +49,28 @@ if! $posix $* <'print $path.directory(a/b c/d/)' >"a/ c/" : dir-names } +: root_directory +: +{ + : posix + : + if $posix + { + $* <'print $root_directory([path] /a/b)' >'/' : basics + $* <'print $root_directory([path] /)' >'/' : root + } + + : windows + : + if $windows + { + $* <'print $root_directory([path] "c:\\a\\b")' >'c:\' : basics + $* <'print $root_directory([path] "c:")' >'c:\' : root + } + + $* <'print $root_directory([path] a/b)' >'' : relative +} + : base : { |