iankelling.org
/
git
/
lnf
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
update README for gitorious move
[lnf]
/
test
/
test
diff --git
a/test/test
b/test/test
index 218b67c1ddd981ebadb9dd2c863c7730cd7ddfa9..d3a5eac00b8976fc42db94d7c0c2729a46f5cb78 100755
(executable)
--- a/
test/test
+++ b/
test/test
@@
-11,15
+11,15
@@
# 2 arguments, test that a file in the link location is removed and replaed with a link
case1() {
touch b
# 2 arguments, test that a file in the link location is removed and replaed with a link
case1() {
touch b
- lnf a b
- [[ -L 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
}
# 2 arguments, test that directory in link location is removed and replaced with a link
case2() {
mkdir b
- lnf a b
- [[ -L b ]]
+ lnf
-T
a b
+ [[ -L b ]]
}
# single argument, test that an existing non-empty directory is removed and replaced by a link
}
# single argument, test that an existing non-empty directory is removed and replaced by a link
@@
-27,7
+27,7
@@
case3() {
mkdir a
touch a/b
lnf ../a
mkdir a
touch a/b
lnf ../a
- [[ -L a ]]
+ [[ -L a ]]
}
# 4 arguments, 2 of the link locations already contain files.
}
# 4 arguments, 2 of the link locations already contain files.
@@
-37,23
+37,28
@@
case4() {
touch a/b
touch a/c
lnf b c d a
touch a/b
touch a/c
lnf b c d a
- [[ -L a/b && -L a/c && -L a/d ]]
+ [[ -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() {
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
}
source ${0%/*}/../lnf-function