X-Git-Url: https://iankelling.org/git/?p=lnf;a=blobdiff_plain;f=test%2Ftest;fp=test%2Ftest;h=afbb6306a3fed7172407340f09a3a964cd9fbc96;hp=218b67c1ddd981ebadb9dd2c863c7730cd7ddfa9;hb=cca94a4f6e8acc20eacb8219b5f910e89b312802;hpb=a5d3fe7ecee597e33e7081f45847a6c9f25a22fb diff --git a/test/test b/test/test index 218b67c..afbb630 100755 --- a/test/test +++ b/test/test @@ -11,14 +11,14 @@ # 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 ]] } @@ -40,20 +40,25 @@ case4() { [[ -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