diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2021-11-26 11:04:15 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2021-11-26 11:13:42 +0200 |
commit | a8a54893c09c86e560e6fee9d7972419716dd56d (patch) | |
tree | eae16c1efe034f8593de4cc7981268d584a027c1 /tests/function/path/testscript | |
parent | 234869bfab747a373ac8815fc567957a8b05237e (diff) |
Add $size(string), $size(path), and $size(dir_path) functions
Diffstat (limited to 'tests/function/path/testscript')
-rw-r--r-- | tests/function/path/testscript | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/function/path/testscript b/tests/function/path/testscript index e674497..55d727f 100644 --- a/tests/function/path/testscript +++ b/tests/function/path/testscript @@ -119,6 +119,17 @@ if! $posix } } +: size +: +{ + $* <'print $size([path] abc)' >'3' : basics + $* <'print $size([path] )' >'0' : zero + + $* <'print $size([dir_path] abc)' >'3' : dir-basics + $* <'print $size([dir_path] abc/)' >'3' : dir-separator + $* <'print $size([dir_path] )' >'0' : dir-zero +} + : invalid-path : p = ($posix ? /../foo : 'c:/../foo'); |