mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-16 00:16:12 +00:00
improve tests
This commit is contained in:
@@ -65,7 +65,10 @@ echo "changed" > ${token}
|
|||||||
# update
|
# update
|
||||||
cd ${ddpath} | ${bin} update -f -c ${cfg} ${tmpd}
|
cd ${ddpath} | ${bin} update -f -c ${cfg} ${tmpd}
|
||||||
|
|
||||||
|
grep 'changed' ${token} >/dev/null 2>&1
|
||||||
|
|
||||||
## CLEANING
|
## CLEANING
|
||||||
rm -rf ${basedir} ${tmpd}
|
rm -rf ${basedir} ${tmpd}
|
||||||
|
|
||||||
|
echo "OK"
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -93,9 +93,12 @@ cd ${ddpath} | ${bin} import -c ${cfg} -p p2 \
|
|||||||
${tmpd}/sub/sub/abc \
|
${tmpd}/sub/sub/abc \
|
||||||
${tmpd}/sub/sub2/abc
|
${tmpd}/sub/sub2/abc
|
||||||
|
|
||||||
cat ${cfg}
|
# count dotfiles for p2
|
||||||
|
cnt=`cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p2 -b | grep '^f_' | wc -l`
|
||||||
|
[ "${cnt}" != "4" ] && exit 1
|
||||||
|
|
||||||
## CLEANING
|
## CLEANING
|
||||||
rm -rf ${tmps} ${tmpd}
|
rm -rf ${tmps} ${tmpd}
|
||||||
|
|
||||||
|
echo "OK"
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
@@ -83,7 +83,12 @@ cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1
|
|||||||
cd ${ddpath} | ${bin} compare -c ${cfg} -p p1
|
cd ${ddpath} | ${bin} compare -c ${cfg} -p p1
|
||||||
cd ${ddpath} | ${bin} compare -c ${cfg} -p p2
|
cd ${ddpath} | ${bin} compare -c ${cfg} -p p2
|
||||||
|
|
||||||
|
# count
|
||||||
|
cnt=`cd ${ddpath} | ${bin} listfiles -c ${cfg} -p p1 -b | grep '^f_' | wc -l`
|
||||||
|
[ "${cnt}" != "1" ] && exit 1
|
||||||
|
|
||||||
## CLEANING
|
## CLEANING
|
||||||
rm -rf ${tmps} ${tmpd}
|
rm -rf ${tmps} ${tmpd}
|
||||||
|
|
||||||
|
echo "OK"
|
||||||
exit 0
|
exit 0
|
||||||
|
|||||||
Reference in New Issue
Block a user