1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-05 09:43:49 +00:00

fix tests

This commit is contained in:
deadc0de6
2021-07-15 10:36:28 +02:00
parent 2dd98c9344
commit 56a707183b
3 changed files with 9 additions and 10 deletions

View File

@@ -7,7 +7,7 @@
#
# exit on first error
set -e
set -ev
# all this crap to get current path
rl="readlink -f"
@@ -151,8 +151,7 @@ grep "file" ${tmpd}/dir1/not-empty/file
[ ! -d ${tmpd}/dir2/not-empty ] && exit 1
[ ! -h ${tmpd}/dir2/not-empty ] && exit 1
[ ! -e ${tmpd}/dir2/not-empty/file ] && exit 1
[ ! -d ${tmpd}/dir2/sub ] && exit 1
[ ! -h ${tmpd}/dir2/sub ] && exit 1
[ -d ${tmpd}/dir2/sub ] && exit 1
[ -d ${tmpd}/dir2/sub/empty ] && exit 1
[ -e ${tmpd}/dir2/sub/empty/that.ignore ] && exit 1
grep "p1" ${tmpd}/dir2/not-empty/file
@@ -172,8 +171,6 @@ grep "p1" ${tmpd}/dir3/not-empty/file
# second install won't trigger the action
cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1 -V # 2>&1 | tee ${tmpa}/log
set -e
# check normal
[ -d ${tmpd}/dir1/empty ] && echo "empty directory not cleaned" && exit 1
[ -d ${tmpd}/dir1/sub/empty ] && echo "empty directory not cleaned" && exit 1

View File

@@ -7,7 +7,7 @@
#
# exit on first error
set -e
set -ev
# all this crap to get current path
rl="readlink -f"
@@ -90,11 +90,11 @@ echo "{{@@ profile @@}}" > ${tmps}/dotfiles/dir1/sub/empty/that.ignore
cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1 -V
#cat ${cfg}
# checks normal
# check normal
[ ! -d ${tmpd}/dir1 ] && exit 1
[ ! -d ${tmpd}/dir1/empty ] && exit 1
[ ! -d ${tmpd}/dir1/sub ] && exit 1
[ ! -d ${tmpd}/dir1/sub/empty ] && exit 1
[ -d ${tmpd}/dir1/empty ] && exit 1
[ -d ${tmpd}/dir1/sub ] && exit 1
[ -d ${tmpd}/dir1/sub/empty ] && exit 1
[ ! -d ${tmpd}/dir1/not-empty ] && exit 1
[ ! -e ${tmpd}/dir1/not-empty/file ] && exit 1

View File

@@ -118,6 +118,8 @@ echo ${tokend} > ${tmpx}/a/somefile
echo ${tokend} > ${tmpx}/b/somefile
echo ${tokend} > ${tmpx}/c/somefile
echo ${tokend} > ${tmpx}/a/dir1/otherfile
# create a fake file to ensure dir is created
echo ${tokend} > ${tmpx}/a/dir2/token
tar -cf ${tmps}/dotfiles/ghi -C ${tmpx} .
rm -rf ${tmpx}
tar -tf ${tmps}/dotfiles/ghi