Add another testcase

This commit is contained in:
Nero 2018-03-13 23:48:42 +00:00
parent 79a20986eb
commit 14eb56e8e1

View File

@ -11,7 +11,7 @@ do_test() {
esac esac
if [ -n "$target" ]; then if [ -n "$target" ]; then
ln -s "$target" "$name" ln -sfn "$target" "$name"
else else
touch "$name" touch "$name"
fi fi
@ -26,7 +26,7 @@ do_test() {
echo "Test $1 fail: \"${bin##*/} $name\" returned \"$is\" instead of \"$should\"" echo "Test $1 fail: \"${bin##*/} $name\" returned \"$is\" instead of \"$should\""
stat "$name" stat "$name"
fi fi
rm -r "$name" rm -rf "$name"
} }
touch t touch t
@ -36,5 +36,7 @@ do_test 2 a/b .
do_test 3 a/b .. do_test 3 a/b ..
do_test 4 a/b ../t do_test 4 a/b ../t
do_test 5 a do_test 5 a
do_test 6 a/ /bin
do_test 7 a/
rm -rf "$dir" rm -rf "$dir"