diff --git a/tests-ng/chmod-import.sh b/tests-ng/chmod-import.sh index 4ec980c..b891794 100755 --- a/tests-ng/chmod-import.sh +++ b/tests-ng/chmod-import.sh @@ -54,6 +54,7 @@ echo -e "$(tput setaf 6)==> RUNNING $(basename "${BASH_SOURCE[0]}") <==$(tput sg chmod_to_umask() { u=$(umask) + # shellcheck disable=SC2001 u=$(echo "${u}" | sed 's/^0*//') if [ -d "${1}" ]; then v=$((777 - u)) diff --git a/tests-ng/chmod-install.sh b/tests-ng/chmod-install.sh index ad65417..e0b94e5 100755 --- a/tests-ng/chmod-install.sh +++ b/tests-ng/chmod-install.sh @@ -29,7 +29,7 @@ cur=$(dirname "$(${rl} "${0}")") # dotdrop path can be pass as argument ddpath="${cur}/../" [ "${1}" != "" ] && ddpath="${1}" -[ ! -d ${ddpath} ] && echo "ddpath \"${ddpath}\" is not a directory" && exit 1 +[ ! -d "${ddpath}" ] && echo "ddpath \"${ddpath}\" is not a directory" && exit 1 export PYTHONPATH="${ddpath}:${PYTHONPATH}" bin="python3 -m dotdrop.dotdrop" @@ -41,9 +41,10 @@ echo "dotdrop path: ${ddpath}" echo "pythonpath: ${PYTHONPATH}" # get the helpers -source ${cur}/helpers +# shellcheck source=tests-ng/helpers +source "${cur}"/helpers -echo -e "$(tput setaf 6)==> RUNNING $(basename ${BASH_SOURCE[0]}) <==$(tput sgr0)" +echo -e "$(tput setaf 6)==> RUNNING $(basename "${BASH_SOURCE[0]}") <==$(tput sgr0)" ################################################################ # this is the test @@ -54,28 +55,22 @@ echo -e "$(tput setaf 6)==> RUNNING $(basename ${BASH_SOURCE[0]}) <==$(tput sgr0 has_rights() { echo "testing ${1} is ${2}" - [ ! -e "$1" ] && echo "`basename $1` does not exist" && exit 1 - local mode=`stat -L -c '%a' "$1"` - [ "${mode}" != "$2" ] && echo "bad mode for `basename "$1"` (${mode} VS expected ${2})" && exit 1 + [ ! -e "$1" ] && echo "$(basename "$1") does not exist" && exit 1 + local mode + mode=$(stat -L -c '%a' "$1") + [ "${mode}" != "$2" ] && echo "bad mode for $(basename "$1") (${mode} VS expected ${2})" && exit 1 true } get_file_mode() { u=$(umask) + # shellcheck disable=2001 u=$(echo "${u}" | sed 's/^0*//') v=$((666 - u)) echo "${v}" } -get_dir_mode() -{ - u=$(umask) - u=$(echo "${u}" | sed 's/^0*//') - v=$((777 - u)) - echo "${v}" -} - # the dotfile source tmps=$(mktemp -d --suffix='-dotdrop-tests' || mktemp -d) mkdir -p "${tmps}"/dotfiles @@ -271,7 +266,11 @@ echo "nomode" > "${tmps}"/dotfiles/nomode chmod 600 "${tmps}"/dotfiles/nomode echo "nomode" > "${tmpd}"/nomode chmod 700 "${tmpd}"/nomode -cd "${ddpath}" | printf 'y\ny\n' | ${bin} install -f -c "${cfg}" -p p2 -V f_nomode +( + d "${ddpath}" + printf 'y\ny\n' | ${bin} install -f -c "${cfg}" -p p2 -V f_nomode + exit $? +) echo "different mode (2)" has_rights "${tmpd}/nomode" "600" diff --git a/tests-ng/chmod-more.sh b/tests-ng/chmod-more.sh index 955eb75..614e203 100755 --- a/tests-ng/chmod-more.sh +++ b/tests-ng/chmod-more.sh @@ -29,7 +29,7 @@ cur=$(dirname "$(${rl} "${0}")") # dotdrop path can be pass as argument ddpath="${cur}/../" [ "${1}" != "" ] && ddpath="${1}" -[ ! -d ${ddpath} ] && echo "ddpath \"${ddpath}\" is not a directory" && exit 1 +[ ! -d "${ddpath}" ] && echo "ddpath \"${ddpath}\" is not a directory" && exit 1 export PYTHONPATH="${ddpath}:${PYTHONPATH}" bin="python3 -m dotdrop.dotdrop" @@ -41,9 +41,10 @@ echo "dotdrop path: ${ddpath}" echo "pythonpath: ${PYTHONPATH}" # get the helpers -source ${cur}/helpers +# shellcheck source=tests-ng/helpers +source "${cur}"/helpers -echo -e "$(tput setaf 6)==> RUNNING $(basename ${BASH_SOURCE[0]}) <==$(tput sgr0)" +echo -e "$(tput setaf 6)==> RUNNING $(basename "${BASH_SOURCE[0]}") <==$(tput sgr0)" ################################################################ # this is the test @@ -54,25 +55,13 @@ echo -e "$(tput setaf 6)==> RUNNING $(basename ${BASH_SOURCE[0]}) <==$(tput sgr0 has_rights() { echo "testing ${1} is ${2}" - [ ! -e "$1" ] && echo "`basename $1` does not exist" && exit 1 - local mode=`stat -L -c '%a' "$1"` - [ "${mode}" != "$2" ] && echo "bad mode for `basename "$1"` (${mode} instead of ${2})" && exit 1 + [ ! -e "$1" ] && echo "$(basename "$1") does not exist" && exit 1 + local mode + mode=$(stat -L -c '%a' "$1") + [ "${mode}" != "$2" ] && echo "bad mode for $(basename "$1") (${mode} instead of ${2})" && exit 1 true } -# $1 file -chmod_to_umask() -{ - u=$(umask) - u=$(echo "${u}" | sed 's/^0*//') - if [ -d "${1}" ]; then - v=$((777 - u)) - else - v=$((666 - u)) - fi - chmod ${v} "${1}" -} - # the dotfile source tmps=$(mktemp -d --suffix='-dotdrop-tests' || mktemp -d) mkdir -p "${tmps}"/dotfiles diff --git a/tests-ng/chmod-preserve-install.sh b/tests-ng/chmod-preserve-install.sh index 2e1fe50..75b822c 100755 --- a/tests-ng/chmod-preserve-install.sh +++ b/tests-ng/chmod-preserve-install.sh @@ -27,7 +27,7 @@ cur=$(dirname "$(${rl} "${0}")") # dotdrop path can be pass as argument ddpath="${cur}/../" [ "${1}" != "" ] && ddpath="${1}" -[ ! -d ${ddpath} ] && echo "ddpath \"${ddpath}\" is not a directory" && exit 1 +[ ! -d "${ddpath}" ] && echo "ddpath \"${ddpath}\" is not a directory" && exit 1 export PYTHONPATH="${ddpath}:${PYTHONPATH}" bin="python3 -m dotdrop.dotdrop" @@ -39,9 +39,10 @@ echo "dotdrop path: ${ddpath}" echo "pythonpath: ${PYTHONPATH}" # get the helpers -source ${cur}/helpers +# shellcheck source=tests-ng/helpers +source "${cur}"/helpers -echo -e "$(tput setaf 6)==> RUNNING $(basename ${BASH_SOURCE[0]}) <==$(tput sgr0)" +echo -e "$(tput setaf 6)==> RUNNING $(basename "${BASH_SOURCE[0]}") <==$(tput sgr0)" ################################################################ # this is the test @@ -52,9 +53,10 @@ echo -e "$(tput setaf 6)==> RUNNING $(basename ${BASH_SOURCE[0]}) <==$(tput sgr0 has_rights() { echo "testing ${1} is ${2}" - [ ! -e "$1" ] && echo "`basename $1` does not exist" && exit 1 - local mode=`stat -L -c '%a' "$1"` - [ "${mode}" != "$2" ] && echo "bad mode for `basename $1` (${mode} VS expected ${2})" && exit 1 + [ ! -e "$1" ] && echo "$(basename "$1") does not exist" && exit 1 + local mode + mode=$(stat -L -c '%a' "$1") + [ "${mode}" != "$2" ] && echo "bad mode for $(basename "$1") (${mode} VS expected ${2})" && exit 1 true } @@ -62,21 +64,24 @@ has_rights() is_same_as() { echo "testing ${1} has same rights than ${2}" - [ ! -e "$1" ] && echo "`basename $1` does not exist" && exit 1 - [ ! -e "$2" ] && echo "`basename $2` does not exist" && exit 1 + [ ! -e "$1" ] && echo "$(basename "$1") does not exist" && exit 1 + [ ! -e "$2" ] && echo "$(basename "$2") does not exist" && exit 1 - local mode1=`stat -L -c '%a' "$1"` + local mode1 + mode1=$(stat -L -c '%a' "$1") echo "$1: ${mode1}" - local mode2=`stat -L -c '%a' "$2"` + local mode2 + mode2=$(stat -L -c '%a' "$2") echo "$2: ${mode2}" - [ "${mode1}" != "${mode2}" ] && echo "`basename $1` (${mode1}) does not have same mode as `basename "$2"` (${mode2})" && exit 1 + [ "${mode1}" != "${mode2}" ] && echo "$(basename "$1") (${mode1}) does not have same mode as $(basename "$2") (${mode2})" && exit 1 true } get_default_file_mode() { u=$(umask) + # shellcheck disable=SC2001 u=$(echo "${u}" | sed 's/^0*//') v=$((666 - u)) echo "${v}" @@ -85,6 +90,7 @@ get_default_file_mode() get_default_dir_mode() { u=$(umask) + # shellcheck disable=SC2001 u=$(echo "${u}" | sed 's/^0*//') v=$((777 - u)) echo "${v}" diff --git a/tests-ng/chmod-update.sh b/tests-ng/chmod-update.sh index bb452d8..cff2bbd 100755 --- a/tests-ng/chmod-update.sh +++ b/tests-ng/chmod-update.sh @@ -111,7 +111,8 @@ chmod 777 "${dnormal}" cd "${ddpath}" | ${bin} update -c "${cfg}" -f -p p1 -V "${dnormal}" # check rights updated -[ "$(stat -c '%a' "${tmps}"/dotfiles/"${tmpd}"/$(basename "${dnormal}"))" != "777" ] && echo "rights not updated (1)" && exit 1 +bname=$(basename "${dnormal}") +[ "$(stat -c '%a' "${tmps}"/dotfiles/"${tmpd}"/"${bname}")" != "777" ] && echo "rights not updated (1)" && exit 1 cnt=$(cat "${cfg}" | grep "chmod: '777'" | wc -l) [ "${cnt}" != "1" ] && echo "chmod not updated (1)" && exit 1 @@ -122,7 +123,8 @@ chmod 777 "${dlink}" cd "${ddpath}" | ${bin} update -c "${cfg}" -f -p p1 -V "${dlink}" # check rights updated -[ "$(stat -c '%a' "${tmps}"/dotfiles/"${tmpd}"/$(basename "${dlink}"))" != "777" ] && echo "rights not updated (2)" && exit 1 +bname=$(basename "${dlink}") +[ "$(stat -c '%a' "${tmps}"/dotfiles/"${tmpd}"/"${bname}")" != "777" ] && echo "rights not updated (2)" && exit 1 cnt=$(cat "${cfg}" | grep "chmod: '777'" | wc -l) [ "${cnt}" != "2" ] && echo "chmod not updated (2)" && exit 1 @@ -132,7 +134,8 @@ chmod 777 "${dlinkchildren}" cd "${ddpath}" | ${bin} update -c "${cfg}" -f -p p1 -V "${dlinkchildren}" # check rights updated -[ "$(stat -c '%a' "${tmps}"/dotfiles/"${tmpd}"/$(basename "${dlinkchildren}"))" != "777" ] && echo "rights not updated (3)" && exit 1 +bname=$(basename "${dlinkchildren}") +[ "$(stat -c '%a' "${tmps}"/dotfiles/"${tmpd}"/"${bname}")" != "777" ] && echo "rights not updated (3)" && exit 1 cnt=$(cat "${cfg}" | grep "chmod: '777'" | wc -l) [ "${cnt}" != "3" ] && echo "chmod not updated (3)" && exit 1 @@ -142,7 +145,8 @@ chmod 777 "${fnormal}" cd "${ddpath}" | ${bin} update -c "${cfg}" -f -p p1 -V "${fnormal}" # check rights updated -[ "$(stat -c '%a' "${tmps}"/dotfiles/"${tmpd}"/$(basename "${fnormal}"))" != "777" ] && echo "rights not updated (4)" && exit 1 +bname=$(basename "${fnormal}") +[ "$(stat -c '%a' "${tmps}"/dotfiles/"${tmpd}"/"${bname}")" != "777" ] && echo "rights not updated (4)" && exit 1 cnt=$(cat "${cfg}" | grep "chmod: '777'" | wc -l) [ "${cnt}" != "4" ] && echo "chmod not updated (4)" && exit 1 @@ -152,7 +156,8 @@ chmod 777 "${flink}" cd "${ddpath}" | ${bin} update -c "${cfg}" -f -p p1 -V "${flink}" # check rights updated -[ "$(stat -c '%a' "${tmps}"/dotfiles/"${tmpd}"/$(basename "${flink}"))" != "777" ] && echo "rights not updated (5)" && exit 1 +bname=$(basename "${flink}") +[ "$(stat -c '%a' "${tmps}"/dotfiles/"${tmpd}"/"${bname}")" != "777" ] && echo "rights not updated (5)" && exit 1 cnt=$(cat "${cfg}" | grep "chmod: '777'" | wc -l) [ "${cnt}" != "5" ] && echo "chmod not updated (5)" && exit 1 diff --git a/tests-ng/clear-workdir.sh b/tests-ng/clear-workdir.sh index 89632c7..add60da 100755 --- a/tests-ng/clear-workdir.sh +++ b/tests-ng/clear-workdir.sh @@ -96,8 +96,11 @@ cd "${ddpath}" | ${bin} install -c "${cfg}" -f -p p1 --verbose | grep '^1 dotfil touch "${DOTDROP_WORKDIR}"/new echo "[+] re-install with clear-workdir in cli" -cd "${ddpath}" | printf "y\n" | ${bin} install -W -c "${cfg}" -p p1 --verbose -[ "$?" != "0" ] && exit 1 +( + cd "${ddpath}" + printf "y\n" | ${bin} install -W -c "${cfg}" -p p1 --verbose + exit $? +) [ ! -e "${tmpd}"/x ] && echo "f_x not installed" && exit 1 [ ! -h "${tmpd}"/x ] && echo "f_x not symlink" && exit 1 @@ -124,8 +127,11 @@ profiles: dotfiles: - f_x _EOF -cd "${ddpath}" | printf "y\n" | ${bin} install -W -c "${cfg}" -p p1 --verbose -[ "$?" != "0" ] && exit 1 +( + cd "${ddpath}" + printf "y\n" | ${bin} install -W -c "${cfg}" -p p1 --verbose + exit $? +) [ ! -e "${tmpd}"/x ] && echo "f_x not installed" && exit 1 [ ! -h "${tmpd}"/x ] && echo "f_x not symlink" && exit 1 diff --git a/tests-ng/compare-profile-check.sh b/tests-ng/compare-profile-check.sh index c8c33f2..89594cd 100755 --- a/tests-ng/compare-profile-check.sh +++ b/tests-ng/compare-profile-check.sh @@ -51,7 +51,7 @@ dt="${tmps}/dotfiles" mkdir -p "${dt}" xori="profile x" -xori="profile y" +yori="profile y" echo "${xori}" > "${dt}"/file_x echo "${yori}" > "${dt}"/file_y diff --git a/tests-ng/filter_file.sh b/tests-ng/filter_file.sh index 41725f6..38479de 100755 --- a/tests-ng/filter_file.sh +++ b/tests-ng/filter_file.sh @@ -124,10 +124,10 @@ _EOF echo "this is the test dotfile" > "${tmps}"/dotfiles/abc # test imported function -echo "{{@@ "abc" | filter1 @@}}" >> "${tmps}"/dotfiles/abc -echo "{{@@ "arg1" | filter2('arg2') @@}}" >> "${tmps}"/dotfiles/abc -echo "{{@@ "13" | filter3() @@}}" >> "${tmps}"/dotfiles/abc -echo "{{@@ "something" | filter_ext() @@}}" >> "${tmps}"/dotfiles/abc +echo "{{@@ \"abc\" | filter1 @@}}" >> "${tmps}"/dotfiles/abc +echo "{{@@ \"arg1\" | filter2('arg2') @@}}" >> "${tmps}"/dotfiles/abc +echo "{{@@ \"13\" | filter3() @@}}" >> "${tmps}"/dotfiles/abc +echo "{{@@ \"something\" | filter_ext() @@}}" >> "${tmps}"/dotfiles/abc echo "{{@@ filt @@}}variable" >> "${tmps}"/dotfiles/abc # install diff --git a/tests-ng/global-compare-ignore.sh b/tests-ng/global-compare-ignore.sh index e101293..05e2a21 100755 --- a/tests-ng/global-compare-ignore.sh +++ b/tests-ng/global-compare-ignore.sh @@ -104,7 +104,6 @@ sed '/dotpath: dotfiles/a \ \ cmpignore:\n\ \ \ \ - "*b"' "${cfg}" > "${cfg2}" cat "${cfg2}" # expects no diff -patt="*b" echo "[+] comparing with ignore in dotfile - 0 diff" set +e cd "${ddpath}" | ${bin} compare -c "${cfg2}" --verbose diff --git a/tests-ng/import-configs.sh b/tests-ng/import-configs.sh index 079c032..e729240 100755 --- a/tests-ng/import-configs.sh +++ b/tests-ng/import-configs.sh @@ -158,7 +158,7 @@ cd "${ddpath}" | ${bin} compare -c "${cfg1}" -p p2 -V # test with non-existing dotpath this time rm -rf "${tmps}"/dotfiles -rm -rf "${tmpd}"/* +rm -rf "${tmpd:?}"/* cat > "${cfg1}" << _EOF config: @@ -190,7 +190,7 @@ cd "${ddpath}" | ${bin} compare -c "${cfg1}" -p p2 -V # test with same profile defined in both rm -rf "${tmps}"/dotfiles -rm -rf "${tmpd}"/* +rm -rf "${tmpd:?}"/* cat > "${cfg1}" << _EOF config: diff --git a/tests-ng/import-ignore.sh b/tests-ng/import-ignore.sh index 82949d0..c9ac538 100755 --- a/tests-ng/import-ignore.sh +++ b/tests-ng/import-ignore.sh @@ -49,13 +49,6 @@ echo -e "$(tput setaf 6)==> RUNNING $(basename "${BASH_SOURCE[0]}") <==$(tput sg # this is the test ################################################################ -# $1 pattern -# $2 path -grep_or_fail() -{ - grep "${1}" "${2}" >/dev/null 2>&1 || (echo "pattern not found in ${2}" && exit 1) -} - # the dotfile source tmps=$(mktemp -d --suffix='-dotdrop-tests' || mktemp -d) mkdir -p "${tmps}"/dotfiles diff --git a/tests-ng/install-ignore.sh b/tests-ng/install-ignore.sh index 5011a7c..0eacf36 100755 --- a/tests-ng/install-ignore.sh +++ b/tests-ng/install-ignore.sh @@ -125,8 +125,11 @@ echo "(3) found ${nb} README.md file(s)" ## reinstall to trigger showdiff echo "showdiff" > "${tmpd}"/program/a -cd "${ddpath}" | echo "y" | ${bin} install --showdiff -c "${cfg}" --verbose -f -[ "$?" != "0" ] && exit 1 +( + cd "${ddpath}" + printf "y\n" | ${bin} install --showdiff -c "${cfg}" --verbose -f + exit $? +) # test templated subdir cat > "${cfg}" << _EOF diff --git a/tests-ng/install.sh b/tests-ng/install.sh index 83da88c..c832e8d 100755 --- a/tests-ng/install.sh +++ b/tests-ng/install.sh @@ -28,7 +28,7 @@ cur=$(dirname "$(${rl} "${0}")") # dotdrop path can be pass as argument ddpath="${cur}/../" [ "${1}" != "" ] && ddpath="${1}" -[ ! -d ${ddpath} ] && echo "ddpath \"${ddpath}\" is not a directory" && exit 1 +[ ! -d "${ddpath}" ] && echo "ddpath \"${ddpath}\" is not a directory" && exit 1 export PYTHONPATH="${ddpath}:${PYTHONPATH}" bin="python3 -m dotdrop.dotdrop" @@ -40,9 +40,10 @@ echo "dotdrop path: ${ddpath}" echo "pythonpath: ${PYTHONPATH}" # get the helpers -source ${cur}/helpers +# shellcheck source=tests-ng/helpers +source "${cur}"/helpers -echo -e "$(tput setaf 6)==> RUNNING $(basename ${BASH_SOURCE[0]}) <==$(tput sgr0)" +echo -e "$(tput setaf 6)==> RUNNING $(basename "${BASH_SOURCE[0]}") <==$(tput sgr0)" ################################################################ # this is the test @@ -50,8 +51,9 @@ echo -e "$(tput setaf 6)==> RUNNING $(basename ${BASH_SOURCE[0]}) <==$(tput sgr0 get_file_mode() { - u=`umask` - u=`echo ${u} | sed 's/^0*//'` + u=$(umask) + # shellcheck disable=SC2001 + u=$(echo "${u}" | sed 's/^0*//') v=$((666 - u)) echo "${v}" } @@ -61,9 +63,10 @@ get_file_mode() has_rights() { echo "testing ${1} is ${2}" - [ ! -e "$1" ] && echo "`basename $1` does not exist" && exit 1 - local mode=`stat -L -c '%a' "$1"` - [ "${mode}" != "$2" ] && echo "bad mode for `basename "$1"` (${mode} VS expected ${2})" && exit 1 + [ ! -e "$1" ] && echo "$(basename "$1") does not exist" && exit 1 + local mode + mode=$(stat -L -c '%a' "$1") + [ "${mode}" != "$2" ] && echo "bad mode for $(basename "$1") (${mode} VS expected ${2})" && exit 1 true } @@ -113,15 +116,21 @@ chmod 644 "${tmpd}"/x mode=$(get_file_mode "${tmpd}"/x) echo "[+] re-install with no" -cd "${ddpath}" | printf "N\n" | ${bin} install -c "${cfg}" -p p1 --verbose -[ "$?" != "0" ] && exit 1 +( + cd "${ddpath}" + printf "N\n" | ${bin} install -c "${cfg}" -p p1 --verbose + exit ${?} +) # if user answers N, chmod should not be done has_rights "${tmpd}/x" "${mode}" echo "[+] re-install with yes" -cd "${ddpath}" | printf "y\n" | ${bin} install -c "${cfg}" -p p1 --verbose -[ "$?" != "0" ] && exit 1 +( + cd "${ddpath}" + printf "y\n" | ${bin} install -c "${cfg}" -p p1 --verbose + exit ${?} +) has_rights "${tmpd}/x" "666" diff --git a/tests-ng/link-value-tests.sh b/tests-ng/link-value-tests.sh index 62b8df5..e923a17 100755 --- a/tests-ng/link-value-tests.sh +++ b/tests-ng/link-value-tests.sh @@ -29,7 +29,7 @@ cur=$(dirname "$(${rl} "${0}")") # dotdrop path can be pass as argument ddpath="${cur}/../" [ "${1}" != "" ] && ddpath="${1}" -[ ! -d ${ddpath} ] && echo "ddpath \"${ddpath}\" is not a directory" && exit 1 +[ ! -d "${ddpath}" ] && echo "ddpath \"${ddpath}\" is not a directory" && exit 1 export PYTHONPATH="${ddpath}:${PYTHONPATH}" bin="python3 -m dotdrop.dotdrop" @@ -41,19 +41,20 @@ echo "dotdrop path: ${ddpath}" echo "pythonpath: ${PYTHONPATH}" # get the helpers -source ${cur}/helpers +# shellcheck source=tests-ng/helpers +source "${cur}"/helpers -echo -e "$(tput setaf 6)==> RUNNING $(basename ${BASH_SOURCE[0]}) <==$(tput sgr0)" +echo -e "$(tput setaf 6)==> RUNNING $(basename "${BASH_SOURCE[0]}") <==$(tput sgr0)" ################################################################ # this is the test ################################################################ # the dotfile source -tmps=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d` -mkdir -p ${tmps}/dotfiles +tmps=$(mktemp -d --suffix='-dotdrop-tests' || mktemp -d) +mkdir -p "${tmps}"/dotfiles # the dotfile destination -tmpd=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d` +tmpd=$(mktemp -d --suffix='-dotdrop-tests' || mktemp -d) clear_on_exit "${tmps}" clear_on_exit "${tmpd}" @@ -64,13 +65,13 @@ cfg="${tmps}/config.yaml" # ---------------------------------------------------------- echo -e "\n======> import with all default" # create the source -rm -rf ${tmpd}/qwert -echo "test" > ${tmpd}/qwert +rm -rf "${tmpd}"/qwert +echo "test" > "${tmpd}"/qwert # clean -rm -rf ${tmps}/dotfiles -mkdir -p ${tmps}/dotfiles +rm -rf "${tmps}"/dotfiles +mkdir -p "${tmps}"/dotfiles # config file -cat > ${cfg} << _EOF +cat > "${cfg}" << _EOF config: backup: true create: true @@ -81,28 +82,28 @@ _EOF # import df="${tmpd}/qwert" -cd ${ddpath} | ${bin} import -f -c ${cfg} -p p1 ${df} -V +cd "${ddpath}" | ${bin} import -f -c "${cfg}" -p p1 "${df}" -V # checks -cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:nolink,' +cd "${ddpath}" | ${bin} files -c "${cfg}" -p p1 -V +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 -cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1 -V -[ ! -e ${df} ] && echo "does not exist" && exit 1 -[ -h ${df} ] && echo "is symlink" && exit 1 +rm -rf "${tmpd}"/qwert +cd "${ddpath}" | ${bin} install -f -c "${cfg}" -p p1 -V +[ ! -e "${df}" ] && echo "does not exist" && exit 1 +[ -h "${df}" ] && echo "is symlink" && exit 1 # ---------------------------------------------------------- echo -e "\n======> import with link_on_import=nolink and link_dotfile_default=nolink" # create the source -rm -rf ${tmpd}/qwert -echo "test" > ${tmpd}/qwert +rm -rf "${tmpd}"/qwert +echo "test" > "${tmpd}"/qwert # clean -rm -rf ${tmps}/dotfiles -mkdir -p ${tmps}/dotfiles +rm -rf "${tmps}"/dotfiles +mkdir -p "${tmps}"/dotfiles # config file -cat > ${cfg} << _EOF +cat > "${cfg}" << _EOF config: backup: true create: true @@ -115,28 +116,28 @@ _EOF # import df="${tmpd}/qwert" -cd ${ddpath} | ${bin} import -f -c ${cfg} -p p1 ${df} -V +cd "${ddpath}" | ${bin} import -f -c "${cfg}" -p p1 "${df}" -V # checks -cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:nolink,' +cd "${ddpath}" | ${bin} files -c "${cfg}" -p p1 -V +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 -cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1 -V -[ ! -e ${df} ] && echo "does not exist" && exit 1 -[ -h ${df} ] && echo "is symlink" && exit 1 +rm -rf "${tmpd}"/qwert +cd "${ddpath}" | ${bin} install -f -c "${cfg}" -p p1 -V +[ ! -e "${df}" ] && echo "does not exist" && exit 1 +[ -h "${df}" ] && echo "is symlink" && exit 1 # ---------------------------------------------------------- echo -e "\n======> import with link_on_import=nolink and link_dotfile_default=nolink and --link=nolink" # create the source -rm -rf ${tmpd}/qwert -echo "test" > ${tmpd}/qwert +rm -rf "${tmpd}"/qwert +echo "test" > "${tmpd}"/qwert # clean -rm -rf ${tmps}/dotfiles -mkdir -p ${tmps}/dotfiles +rm -rf "${tmps}"/dotfiles +mkdir -p "${tmps}"/dotfiles # config file -cat > ${cfg} << _EOF +cat > "${cfg}" << _EOF config: backup: true create: true @@ -149,28 +150,28 @@ _EOF # import df="${tmpd}/qwert" -cd ${ddpath} | ${bin} import -f -c ${cfg} -p p1 ${df} -V --link=nolink +cd "${ddpath}" | ${bin} import -f -c "${cfg}" -p p1 "${df}" -V --link=nolink # checks -cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:nolink,' +cd "${ddpath}" | ${bin} files -c "${cfg}" -p p1 -V +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 -cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1 -V -[ ! -e ${df} ] && echo "does not exist" && exit 1 -[ -h ${df} ] && echo "is symlink" && exit 1 +rm -rf "${tmpd}"/qwert +cd "${ddpath}" | ${bin} install -f -c "${cfg}" -p p1 -V +[ ! -e "${df}" ] && echo "does not exist" && exit 1 +[ -h "${df}" ] && echo "is symlink" && exit 1 # ---------------------------------------------------------- echo -e "\n======> import with link_on_import=nolink and link_dotfile_default=nolink and --link=link" # create the source -rm -rf ${tmpd}/qwert -echo "test" > ${tmpd}/qwert +rm -rf "${tmpd}"/qwert +echo "test" > "${tmpd}"/qwert # clean -rm -rf ${tmps}/dotfiles -mkdir -p ${tmps}/dotfiles +rm -rf "${tmps}"/dotfiles +mkdir -p "${tmps}"/dotfiles # config file -cat > ${cfg} << _EOF +cat > "${cfg}" << _EOF config: backup: true create: true @@ -183,28 +184,28 @@ _EOF # import df="${tmpd}/qwert" -cd ${ddpath} | ${bin} import -f -c ${cfg} -p p1 ${df} -V --link=absolute +cd "${ddpath}" | ${bin} import -f -c "${cfg}" -p p1 "${df}" -V --link=absolute # checks -cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:absolute,' +cd "${ddpath}" | ${bin} files -c "${cfg}" -p p1 -V +cd "${ddpath}" | ${bin} files -c "${cfg}" -p p1 -V -G | grep "f_$(basename "${df}")" | head -1 | grep ',link:absolute,' # try to install -rm -rf ${tmpd}/qwert -cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1 -V -[ ! -e ${df} ] && echo "does not exist" && exit 1 -[ ! -h ${df} ] && echo "not symlink" && exit 1 +rm -rf "${tmpd}"/qwert +cd "${ddpath}" | ${bin} install -f -c "${cfg}" -p p1 -V +[ ! -e "${df}" ] && echo "does not exist" && exit 1 +[ ! -h "${df}" ] && echo "not symlink" && exit 1 # ---------------------------------------------------------- echo -e "\n======> import with link_on_import=link and link_dotfile_default=nolink" # create the source -rm -rf ${tmpd}/qwert -echo "test" > ${tmpd}/qwert +rm -rf "${tmpd}"/qwert +echo "test" > "${tmpd}"/qwert # clean -rm -rf ${tmps}/dotfiles -mkdir -p ${tmps}/dotfiles +rm -rf "${tmps}"/dotfiles +mkdir -p "${tmps}"/dotfiles # config file -cat > ${cfg} << _EOF +cat > "${cfg}" << _EOF config: backup: true create: true @@ -217,28 +218,28 @@ _EOF # import df="${tmpd}/qwert" -cd ${ddpath} | ${bin} import -f -c ${cfg} -p p1 ${df} -V +cd "${ddpath}" | ${bin} import -f -c "${cfg}" -p p1 "${df}" -V # checks -cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:absolute,' +cd "${ddpath}" | ${bin} files -c "${cfg}" -p p1 -V +cd "${ddpath}" | ${bin} files -c "${cfg}" -p p1 -V -G | grep "f_$(basename "${df}")" | head -1 | grep ',link:absolute,' # try to install -rm -rf ${tmpd}/qwert -cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1 -V -[ ! -e ${df} ] && echo "does not exist" && exit 1 -[ ! -h ${df} ] && echo "not symlink" && exit 1 +rm -rf "${tmpd}"/qwert +cd "${ddpath}" | ${bin} install -f -c "${cfg}" -p p1 -V +[ ! -e "${df}" ] && echo "does not exist" && exit 1 +[ ! -h "${df}" ] && echo "not symlink" && exit 1 # ---------------------------------------------------------- echo -e "\n======> import with link_on_import=link and link_dotfile_default=nolink and --link=nolink" # create the source -rm -rf ${tmpd}/qwert -echo "test" > ${tmpd}/qwert +rm -rf "${tmpd}"/qwert +echo "test" > "${tmpd}"/qwert # clean -rm -rf ${tmps}/dotfiles -mkdir -p ${tmps}/dotfiles +rm -rf "${tmps}"/dotfiles +mkdir -p "${tmps}"/dotfiles # config file -cat > ${cfg} << _EOF +cat > "${cfg}" << _EOF config: backup: true create: true @@ -251,28 +252,28 @@ _EOF # import df="${tmpd}/qwert" -cd ${ddpath} | ${bin} import -f -c ${cfg} -p p1 ${df} -V --link=nolink +cd "${ddpath}" | ${bin} import -f -c "${cfg}" -p p1 "${df}" -V --link=nolink # checks -cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:nolink,' +cd "${ddpath}" | ${bin} files -c "${cfg}" -p p1 -V +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 -cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1 -V -[ ! -e ${df} ] && echo "does not exist" && exit 1 -[ -h ${df} ] && echo "is symlink" && exit 1 +rm -rf "${tmpd}"/qwert +cd "${ddpath}" | ${bin} install -f -c "${cfg}" -p p1 -V +[ ! -e "${df}" ] && echo "does not exist" && exit 1 +[ -h "${df}" ] && echo "is symlink" && exit 1 # ---------------------------------------------------------- echo -e "\n======> import with link_on_import=nolink and link_dotfile_default=link" # create the source -rm -rf ${tmpd}/qwert -echo "test" > ${tmpd}/qwert +rm -rf "${tmpd}"/qwert +echo "test" > "${tmpd}"/qwert # clean -rm -rf ${tmps}/dotfiles -mkdir -p ${tmps}/dotfiles +rm -rf "${tmps}"/dotfiles +mkdir -p "${tmps}"/dotfiles # config file -cat > ${cfg} << _EOF +cat > "${cfg}" << _EOF config: backup: true create: true @@ -285,28 +286,28 @@ _EOF # import df="${tmpd}/qwert" -cd ${ddpath} | ${bin} import -f -c ${cfg} -p p1 ${df} -V --link=nolink +cd "${ddpath}" | ${bin} import -f -c "${cfg}" -p p1 "${df}" -V --link=nolink # checks -cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:nolink,' +cd "${ddpath}" | ${bin} files -c "${cfg}" -p p1 -V +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 -cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1 -V -[ ! -e ${df} ] && echo "does not exist" && exit 1 -[ -h ${df} ] && echo "is symlink" && exit 1 +rm -rf "${tmpd}"/qwert +cd "${ddpath}" | ${bin} install -f -c "${cfg}" -p p1 -V +[ ! -e "${df}" ] && echo "does not exist" && exit 1 +[ -h "${df}" ] && echo "is symlink" && exit 1 # ---------------------------------------------------------- echo -e "\n======> import with link_on_import=link and link_dotfile_default=nolink and --link=nolink" # create the source -rm -rf ${tmpd}/qwert -echo "test" > ${tmpd}/qwert +rm -rf "${tmpd}"/qwert +echo "test" > "${tmpd}"/qwert # clean -rm -rf ${tmps}/dotfiles -mkdir -p ${tmps}/dotfiles +rm -rf "${tmps}"/dotfiles +mkdir -p "${tmps}"/dotfiles # config file -cat > ${cfg} << _EOF +cat > "${cfg}" << _EOF config: backup: true create: true @@ -319,28 +320,28 @@ _EOF # import df="${tmpd}/qwert" -cd ${ddpath} | ${bin} import -f -c ${cfg} -p p1 ${df} -V --link=nolink +cd "${ddpath}" | ${bin} import -f -c "${cfg}" -p p1 "${df}" -V --link=nolink # checks -cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:nolink,' +cd "${ddpath}" | ${bin} files -c "${cfg}" -p p1 -V +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 -cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1 -V -[ ! -e ${df} ] && echo "does not exist" && exit 1 -[ -h ${df} ] && echo "is symlink" && exit 1 +rm -rf "${tmpd}"/qwert +cd "${ddpath}" | ${bin} install -f -c "${cfg}" -p p1 -V +[ ! -e "${df}" ] && echo "does not exist" && exit 1 +[ -h "${df}" ] && echo "is symlink" && exit 1 # ---------------------------------------------------------- echo -e "\n======> import with all default and --link=link" # create the source -rm -rf ${tmpd}/qwert -echo "test" > ${tmpd}/qwert +rm -rf "${tmpd}"/qwert +echo "test" > "${tmpd}"/qwert # clean -rm -rf ${tmps}/dotfiles -mkdir -p ${tmps}/dotfiles +rm -rf "${tmps}"/dotfiles +mkdir -p "${tmps}"/dotfiles # config file -cat > ${cfg} << _EOF +cat > "${cfg}" << _EOF config: backup: true create: true @@ -351,28 +352,28 @@ _EOF # import df="${tmpd}/qwert" -cd ${ddpath} | ${bin} import -f -c ${cfg} --link=absolute -p p1 ${df} -V +cd "${ddpath}" | ${bin} import -f -c "${cfg}" --link=absolute -p p1 "${df}" -V # checks -cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "f_`basename ${df}`" | head -1 | grep ',link:absolute,' +cd "${ddpath}" | ${bin} files -c "${cfg}" -p p1 -V +cd "${ddpath}" | ${bin} files -c "${cfg}" -p p1 -V -G | grep "f_$(basename "${df}")" | head -1 | grep ',link:absolute,' # try to install -rm -rf ${tmpd}/qwert -cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1 -V -[ ! -e ${df} ] && echo "does not exist" && exit 1 -[ ! -h ${df} ] && echo "not a symlink" && exit 1 +rm -rf "${tmpd}"/qwert +cd "${ddpath}" | ${bin} install -f -c "${cfg}" -p p1 -V +[ ! -e "${df}" ] && echo "does not exist" && exit 1 +[ ! -h "${df}" ] && echo "not a symlink" && exit 1 # ---------------------------------------------------------- echo -e "\n======> import with all default and --link=link_children" # create the source -rm -rf ${tmpd}/qwert -echo "test" > ${tmpd}/qwert +rm -rf "${tmpd}"/qwert +echo "test" > "${tmpd}"/qwert # clean -rm -rf ${tmps}/dotfiles -mkdir -p ${tmps}/dotfiles +rm -rf "${tmps}"/dotfiles +mkdir -p "${tmps}"/dotfiles # config file -cat > ${cfg} << _EOF +cat > "${cfg}" << _EOF config: backup: true create: true @@ -384,24 +385,24 @@ _EOF # import df="${tmpd}/qwert" set +e -cd ${ddpath} | ${bin} import -f -c ${cfg} --link=link_children -p p1 ${df} -V +cd "${ddpath}" | ${bin} import -f -c "${cfg}" --link=link_children -p p1 "${df}" -V [ "$?" = "0" ] && echo "link_children with file should fail" && exit 1 set -e # ---------------------------------------------------------- echo -e "\n======> import with all default and --link=link_children" # create the source -rm -rf ${tmpd}/qwert -mkdir -p ${tmpd}/qwert -echo "test" > ${tmpd}/qwert/file -mkdir -p ${tmpd}/qwert/directory -echo "test" > ${tmpd}/qwert/directory/file +rm -rf "${tmpd}"/qwert +mkdir -p "${tmpd}"/qwert +echo "test" > "${tmpd}"/qwert/file +mkdir -p "${tmpd}"/qwert/directory +echo "test" > "${tmpd}"/qwert/directory/file # clean -rm -rf ${tmps}/dotfiles -mkdir -p ${tmps}/dotfiles +rm -rf "${tmps}"/dotfiles +mkdir -p "${tmps}"/dotfiles # config file -cat > ${cfg} << _EOF +cat > "${cfg}" << _EOF config: backup: true create: true @@ -412,34 +413,34 @@ _EOF # import df="${tmpd}/qwert" -cd ${ddpath} | ${bin} import -f -c ${cfg} --link=link_children -p p1 ${df} -V +cd "${ddpath}" | ${bin} import -f -c "${cfg}" --link=link_children -p p1 "${df}" -V # checks -cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "d_`basename ${df}`" | head -1 | grep ',link:link_children,' +cd "${ddpath}" | ${bin} files -c "${cfg}" -p p1 -V +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 -cd ${ddpath} | ${bin} install -f -c ${cfg} -p p1 -V -[ ! -e ${df} ] && echo "does not exist" && exit 1 -[ -h ${df} ] && echo "is a symlink" && exit 1 -[ ! -h ${df}/file ] && echo "file is not a symlink" && exit 1 -[ ! -h ${df}/directory ] && echo "directory is not a symlink" && exit 1 -[ -h ${df}/directory/file ] && echo "directory/file is a symlink" && exit 1 +rm -rf "${tmpd}"/qwert +cd "${ddpath}" | ${bin} install -f -c "${cfg}" -p p1 -V +[ ! -e "${df}" ] && echo "does not exist" && exit 1 +[ -h "${df}" ] && echo "is a symlink" && exit 1 +[ ! -h "${df}"/file ] && echo "file is not a symlink" && exit 1 +[ ! -h "${df}"/directory ] && echo "directory is not a symlink" && exit 1 +[ -h "${df}"/directory/file ] && echo "directory/file is a symlink" && exit 1 echo -e "\n======> import with link_on_import=link_children and link_dotfile_default=nolink" # create the source -rm -rf ${tmpd}/qwert -mkdir -p ${tmpd}/qwert -echo "test" > ${tmpd}/qwert/file -mkdir -p ${tmpd}/qwert/directory -echo "test" > ${tmpd}/qwert/directory/file +rm -rf "${tmpd}"/qwert +mkdir -p "${tmpd}"/qwert +echo "test" > "${tmpd}"/qwert/file +mkdir -p "${tmpd}"/qwert/directory +echo "test" > "${tmpd}"/qwert/directory/file # clean -rm -rf ${tmps}/dotfiles -mkdir -p ${tmps}/dotfiles +rm -rf "${tmps}"/dotfiles +mkdir -p "${tmps}"/dotfiles # config file -cat > ${cfg} << _EOF +cat > "${cfg}" << _EOF config: backup: true create: true @@ -452,11 +453,11 @@ _EOF # import df="${tmpd}/qwert" -cd ${ddpath} | ${bin} import -f -c ${cfg} -p p1 ${df} -V +cd "${ddpath}" | ${bin} import -f -c "${cfg}" -p p1 "${df}" -V # checks -cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -cd ${ddpath} | ${bin} files -c ${cfg} -p p1 -V -G | grep "d_`basename "${df}"`" | head -1 | grep ',link:link_children,' +cd "${ddpath}" | ${bin} files -c "${cfg}" -p p1 -V +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 diff --git a/tests-ng/notemplate.sh b/tests-ng/notemplate.sh index d4a67e9..dcebec0 100755 --- a/tests-ng/notemplate.sh +++ b/tests-ng/notemplate.sh @@ -238,7 +238,7 @@ _EOF #cat ${cfg} # clean destination -rm -rf "${tmpd}"/* +rm -rf "${tmpd:?}"/* # install cd "${ddpath}" | ${bin} install -f --showdiff -c "${cfg}" -p p1 -V diff --git a/tests-ng/update-ignore-missing.sh b/tests-ng/update-ignore-missing.sh index a3432d0..18a5b24 100755 --- a/tests-ng/update-ignore-missing.sh +++ b/tests-ng/update-ignore-missing.sh @@ -44,13 +44,6 @@ echo -e "$(tput setaf 6)==> RUNNING $(basename "${BASH_SOURCE[0]}") <==$(tput sg # this is the test ################################################################ -# $1 pattern -# $2 path -grep_or_fail() -{ - grep "${1}" "${2}" >/dev/null 2>&1 || (echo "pattern not found in ${2}" && exit 1) -} - # dotdrop directory tmps=$(mktemp -d --suffix='-dotdrop-tests-source' || mktemp -d) dt="${tmps}/dotfiles" diff --git a/tests-ng/uservariables.sh b/tests-ng/uservariables.sh index 37eb0e2..7dc466a 100755 --- a/tests-ng/uservariables.sh +++ b/tests-ng/uservariables.sh @@ -97,7 +97,11 @@ echo "var4: {{@@ var4 @@}}" >> "${tmps}"/dotfiles/abc # install echo "step 1" -cd "${ddpath}" | echo -e 'var1contentxxx\nvar2contentyyy\nvar3\nvar4\n' | ${bin} install -f -c "${cfg}" -p p1 -V +( + cd "${ddpath}" + printf 'var1contentxxx\nvar2contentyyy\nvar3\nvar4\n' | ${bin} install -f -c "${cfg}" -p p1 -V + exit ${?} +) cat "${tmpd}"/abc diff --git a/tests-ng/workdir-compare.sh b/tests-ng/workdir-compare.sh index 41249e6..13de05b 100755 --- a/tests-ng/workdir-compare.sh +++ b/tests-ng/workdir-compare.sh @@ -49,7 +49,6 @@ echo -e "$(tput setaf 6)==> RUNNING $(basename "${BASH_SOURCE[0]}") <==$(tput sg # this is the test ################################################################ unset DOTDROP_WORKDIR -string="blabla" # the dotfile source tmp=$(mktemp -d --suffix='-dotdrop-tests' || mktemp -d)