Add another testcase
This commit is contained in:
parent
79a20986eb
commit
14eb56e8e1
6
test.sh
6
test.sh
@ -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"
|
||||||
|
Loading…
Reference in New Issue
Block a user