mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-04 19:09:44 +00:00
add tests cleaning
This commit is contained in:
@@ -53,6 +53,9 @@ echo "[+] dotpath dir: ${basedir}/dotfiles"
|
||||
# the temp directory
|
||||
tmpd=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
|
||||
|
||||
clear_on_exit "${basedir}"
|
||||
clear_on_exit "${tmpd}"
|
||||
|
||||
# create a dotfile
|
||||
dftoimport="${tmpd}/a_dotfile"
|
||||
echo 'some content' > ${dftoimport}
|
||||
@@ -101,13 +104,10 @@ cd ${ddpath} | ${bin} install -c ${cfg} -f -p p1 --verbose | grep '^5 dotfile(s)
|
||||
rm -f ${dftoimport}
|
||||
cd ${ddpath} | ${bin} install -c ${cfg} -f -p p1 --verbose | grep '^6 dotfile(s) installed.$'
|
||||
|
||||
nb=`cd ${ddpath} | ${bin} files -c ${cfg} -p p1 --verbose | grep '^[a-zA-Z]' | wc -l`
|
||||
[ "${nb}" != "6" ] && echo 'error in dotfile list' && exit 1
|
||||
nb=`cd ${ddpath} | ${bin} files -c ${cfg} -p p1 --verbose | grep '^[a-zA-Z]' | grep -v '^Dotfile(s)' | wc -l`
|
||||
[ "${nb}" != "6" ] && echo "error in dotfile list (${nb} VS 6)" && exit 1
|
||||
|
||||
#cat ${cfg}
|
||||
|
||||
## CLEANING
|
||||
rm -rf ${basedir} ${tmpd}
|
||||
|
||||
echo "OK"
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user