aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2021-03-20 00:09:51 -0500
committerRob Landley <rob@landley.net>2021-03-20 00:09:51 -0500
commit855eca3eaf8ea849599662900a3de18f6ebab9ef (patch)
treebc925fd31fa0e54c7b94d607e6bcc95bc8e9259e /tests
parent3aaf63f6d908eea164111791ec90fd608000dfe1 (diff)
downloadtoybox-855eca3eaf8ea849599662900a3de18f6ebab9ef.tar.gz
Nir Lichtman pointed out that rm -p shouldn't try to rmdir / at the end.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/rmdir.test4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/rmdir.test b/tests/rmdir.test
index 5b36bbc1..1731ecc2 100755
--- a/tests/rmdir.test
+++ b/tests/rmdir.test
@@ -40,6 +40,10 @@ testing "-p part of path" \
"yes\n" "" ""
rm -rf temp
+skipnot [ $UID -eq 0 ]
+testing '-p abspath' \
+ 'mkdir -p /test/2/3 && rmdir -p /test/2/3 && [ ! -e /test ] && echo yes' \
+ 'yes\n' '' ''
mkdir -p one/two/three
testing "-p one/two/three" \