1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-14 17:37:26 +00:00

improve tests

This commit is contained in:
deadc0de6
2022-05-03 23:13:51 +02:00
committed by deadc0de
parent c31f8ffcd5
commit 3dfa53469e
26 changed files with 108 additions and 71 deletions

View File

@@ -58,13 +58,13 @@ tmps=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
mkdir -p ${tmps}/dotfiles
# the dotfile destination
tmpd=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
mkdir -p ${tmpd}
#echo "dotfile destination: ${tmpd}"
clear_on_exit "${tmps}"
clear_on_exit "${tmpd}"
# dotdrop directory
mkdir -p ${tmpd}
mkdir -p ${tmpd}/a/{b,c}
echo 'a' > ${tmpd}/a/b/abfile
echo 'a' > ${tmpd}/a/c/acfile
@@ -90,7 +90,7 @@ _EOF
# import
echo "[+] import"
cd ${ddpath} | ${bin} import -c ${cfg} --verbose --profile=p1 ${tmpd}/a
cd ${ddpath} | ${bin} import -c ${cfg} -f --verbose --profile=p1 ${tmpd}/a
[ -d ${tmps}/dotfiles/newdir ] && echo "newdir not ignored" && exit 1
[ -e ${tmps}/dotfiles/newdir/newfile ] && echo "newfile not ignored" && exit 1