mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-11 00:54:16 +00:00
fix tests
This commit is contained in:
@@ -125,13 +125,12 @@ set -e
|
||||
|
||||
# test values have been correctly updated
|
||||
echo "========> test for updated entries"
|
||||
dotfiles=`cd ${ddpath} | ${bin} files -c ${cfg} -p p1 | grep -v '^ '`
|
||||
echo "${dotfiles}" | grep '^f_link ' | grep ', link: link)'
|
||||
echo "${dotfiles}" | grep '^f_nolink ' | grep ', link: nolink)'
|
||||
echo "${dotfiles}" | grep '^f_nolink1 ' | grep ', link: nolink)'
|
||||
echo "${dotfiles}" | grep '^f_children ' | grep ', link: link_children)'
|
||||
echo "${dotfiles}" | grep '^f_children2 ' | grep ', link: link_children)'
|
||||
echo "${dotfiles}" | grep '^f_children3 ' | grep ', link: nolink)'
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -G | grep '^f_link' | head -1 | grep ',link:link$'
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -G | grep '^f_nolink' | head -1 | grep ',link:nolink$'
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -G | grep '^f_nolink1' | head -1 | grep ',link:nolink$'
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -G | grep '^f_children' | head -1 | grep ',link:link_children$'
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -G | grep '^f_children2' | head -1 | grep ',link:link_children$'
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -G | grep '^f_children3' | head -1 | grep ',link:nolink$'
|
||||
|
||||
## CLEANING
|
||||
rm -rf ${tmps} ${tmpd}
|
||||
|
||||
@@ -88,8 +88,7 @@ _EOF
|
||||
cd ${ddpath} | ${bin} import -c ${cfg} -p p1 -V --link=link_children ${dt}
|
||||
|
||||
# check is set to link_children
|
||||
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "d_`basename ${dt}`")
|
||||
echo ${line} | grep 'link: link_children'
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "d_`basename ${dt}`" | grep ',link:link_children$'
|
||||
|
||||
# checks file exists in dotpath
|
||||
[ ! -e ${dotpath}/${dt} ] && echo "dotfile not imported" && exit 1
|
||||
|
||||
@@ -79,8 +79,7 @@ cd ${ddpath} | ${bin} import -c ${cfg} -p p1 ${df} -V
|
||||
|
||||
# checks
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
|
||||
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
|
||||
echo ${line} | grep 'link: nolink'
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:nolink$'
|
||||
|
||||
# try to install
|
||||
rm -rf ${tmpd}/qwert
|
||||
@@ -114,8 +113,7 @@ cd ${ddpath} | ${bin} import -c ${cfg} -p p1 ${df} -V
|
||||
|
||||
# checks
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
|
||||
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
|
||||
echo ${line} | grep 'link: nolink'
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:nolink$'
|
||||
|
||||
# try to install
|
||||
rm -rf ${tmpd}/qwert
|
||||
@@ -149,8 +147,7 @@ cd ${ddpath} | ${bin} import -c ${cfg} -p p1 ${df} -V --link=nolink
|
||||
|
||||
# checks
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
|
||||
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
|
||||
echo ${line} | grep 'link: nolink'
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:nolink$'
|
||||
|
||||
# try to install
|
||||
rm -rf ${tmpd}/qwert
|
||||
@@ -184,8 +181,7 @@ cd ${ddpath} | ${bin} import -c ${cfg} -p p1 ${df} -V --link=link
|
||||
|
||||
# checks
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
|
||||
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
|
||||
echo ${line} | grep 'link: link'
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:link$'
|
||||
|
||||
# try to install
|
||||
rm -rf ${tmpd}/qwert
|
||||
@@ -219,8 +215,7 @@ cd ${ddpath} | ${bin} import -c ${cfg} -p p1 ${df} -V
|
||||
|
||||
# checks
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
|
||||
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
|
||||
echo ${line} | grep 'link: link'
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:link$'
|
||||
|
||||
# try to install
|
||||
rm -rf ${tmpd}/qwert
|
||||
@@ -254,8 +249,7 @@ cd ${ddpath} | ${bin} import -c ${cfg} -p p1 ${df} -V --link=nolink
|
||||
|
||||
# checks
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
|
||||
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
|
||||
echo ${line} | grep 'link: nolink'
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:nolink$'
|
||||
|
||||
# try to install
|
||||
rm -rf ${tmpd}/qwert
|
||||
@@ -289,8 +283,7 @@ cd ${ddpath} | ${bin} import -c ${cfg} -p p1 ${df} -V --link=nolink
|
||||
|
||||
# checks
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
|
||||
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
|
||||
echo ${line} | grep 'link: nolink'
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:nolink$'
|
||||
|
||||
# try to install
|
||||
rm -rf ${tmpd}/qwert
|
||||
@@ -324,8 +317,7 @@ cd ${ddpath} | ${bin} import -c ${cfg} -p p1 ${df} -V --link=nolink
|
||||
|
||||
# checks
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
|
||||
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
|
||||
echo ${line} | grep 'link: nolink'
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:nolink$'
|
||||
|
||||
# try to install
|
||||
rm -rf ${tmpd}/qwert
|
||||
@@ -357,8 +349,7 @@ cd ${ddpath} | ${bin} import -c ${cfg} --link=link -p p1 ${df} -V
|
||||
|
||||
# checks
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
|
||||
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "f_`basename ${df}`")
|
||||
echo ${line} | grep 'link: link'
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:link$'
|
||||
|
||||
# try to install
|
||||
rm -rf ${tmpd}/qwert
|
||||
@@ -419,8 +410,7 @@ cd ${ddpath} | ${bin} import -c ${cfg} --link=link_children -p p1 ${df} -V
|
||||
|
||||
# checks
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
|
||||
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "d_`basename ${df}`")
|
||||
echo ${line} | grep 'link: link_children'
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "d_`basename ${df}`" | head -1 | grep ',link:link_children$'
|
||||
|
||||
# try to install
|
||||
rm -rf ${tmpd}/qwert
|
||||
@@ -460,8 +450,7 @@ cd ${ddpath} | ${bin} import -c ${cfg} -p p1 ${df} -V
|
||||
|
||||
# checks
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V
|
||||
line=$(cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V | grep "d_`basename ${df}`")
|
||||
echo ${line} | grep 'link: link_children'
|
||||
cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "d_`basename ${df}`" | head -1 | grep ',link:link_children$'
|
||||
|
||||
# try to install
|
||||
rm -rf ${tmpd}/qwert
|
||||
|
||||
Reference in New Issue
Block a user