diff options
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/test/mkdir.test | 20 |
1 files changed, 18 insertions, 2 deletions
diff --git a/scripts/test/mkdir.test b/scripts/test/mkdir.test index 035d6132..cbd425d4 100644 --- a/scripts/test/mkdir.test +++ b/scripts/test/mkdir.test @@ -32,13 +32,29 @@ testing "mkdir (default permissions)" \ "mkdir one && stat -c %a one" "654\n" "" "" rmdir one -umask 000 - testing "mkdir -m 124" \ "mkdir -m 124 one && stat -c %a one" "124\n" "" "" rmdir one +umask 000 testing "mkdir -p -m 653" \ "mkdir -p -m 653 one/two && stat -c %a one && stat -c %a one/two" \ "777\n653\n" "" "" rm -rf one + +testing "mkdir -p one/two/ (trailing slash)" \ + "mkdir -p one/two/ && [ -d one/two ] && echo yes" "yes\n" "" "" +rm -rf one + +umask 022 +testing "mkdir -p -m 777 (022 umask)" \ + "mkdir -p -m 777 one/two && stat -c %a one && stat -c %a one/two" \ + "755\n777\n" "" "" +rm -rf one + +umask 377 +testing "mkdir -p -m 777 (377 umask)" \ + "mkdir -p -m 777 one/two && stat -c %a one && stat -c %a one/two" \ + "700\n777\n" "" "" +umask 002 +rm -rf one |