# 2 arguments, test that a file in the link location is removed and replaed with a link
case1() {
touch b
- lnf a b
+ lnf -T a b
[[ -L b ]]
}
# 2 arguments, test that directory in link location is removed and replaced with a link
case2() {
mkdir b
- lnf a b
+ lnf -T a b
[[ -L b ]]
}
[[ -L a/b && -L a/c && -L a/d ]]
}
+# 2 arguments, test that link is made correctly
+case5() {
+ mkdir b
+ lnf a b
+ [[ -L b/a ]]
+}
+
+
+
cleanup() {
rm -rf *
}
docases() {
- case1
- cleanup
- case2
- cleanup
- case3
- cleanup
- case4
- cleanup
+ for x in {1..5}; do
+ case$x
+ cleanup
+ done
}
source ${0%/*}/../lnf-function