diff options
-rwxr-xr-x | tests/mkdir/t-slash | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/tests/mkdir/t-slash b/tests/mkdir/t-slash new file mode 100755 index 000000000..8a120cf6e --- /dev/null +++ b/tests/mkdir/t-slash @@ -0,0 +1,28 @@ +#!/bin/sh +# make sure --parents works with a trailing slash + +if test "$VERBOSE" = yes; then + set -x + mkdir --version +fi + +pwd=`pwd` +tmp=t-slash.$$ +trap 'status=$?; cd $pwd; rm -rf $tmp && exit $status' 0 +trap '(exit $?); exit' 1 2 13 15 + +framework_failure=0 +mkdir $tmp || framework_failure=1 +cd $tmp || framework_failure=1 + +if test $framework_failure = 1; then + echo 'failure in testing framework' + (exit 1); exit +fi + +fail=0 + +mkdir -p dir/ || fail=1 +test -d dir || fail=1 + +(exit $fail); exit |