1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-15 11:05:06 +00:00

fix and tests for #302

This commit is contained in:
deadc0de6
2021-02-17 13:40:55 +01:00
parent 58435ece94
commit f4ab927c9b
4 changed files with 24 additions and 2 deletions

View File

@@ -123,11 +123,13 @@ echo "{{@@ header() @@}}" > ${tmps}/dotfiles/fl
# create the normal dotfile
echo "before" > ${tmps}/dotfiles/fn
echo "{#@@ should not be stripped @@#}" >> ${tmps}/dotfiles/fn
echo "{#@@ should be stripped @@#}" >> ${tmps}/dotfiles/fn
echo "after" >> ${tmps}/dotfiles/fn
# install
echo "installing"
cd ${ddpath} | ${bin} install -f --showdiff -c ${cfg} -p p1 -V
echo "comparing"
cd ${ddpath} | ${bin} compare -c ${cfg} -p p1 -V
# simple file
@@ -170,7 +172,7 @@ grep 'header' ${tmpd}/f1 || (echo "header stripped" && exit 1)
# normal dotfile
echo "* normal dotfile"
[ ! -e ${tmpd}/fn ] && echo 'not installed' && exit 1
grep 'should not be stripped' ${tmpd}/fn && echo "no templated" && exit 1
grep 'should be stripped' ${tmpd}/fn && echo "not templated" && exit 1
# test backup done
echo "before" > ${tmps}/dotfiles/f1