mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-11 14:19:00 +00:00
fix test with debug flag
This commit is contained in:
@@ -81,7 +81,7 @@ echo "modified" > ${tmpd}/singlefile
|
|||||||
# default diff (unified)
|
# default diff (unified)
|
||||||
echo "[+] comparing with default diff (unified)"
|
echo "[+] comparing with default diff (unified)"
|
||||||
set +e
|
set +e
|
||||||
cd ${ddpath} | ${bin} compare -c ${cfg} 2>&1 | grep -v '=>' | grep -v '\->' | grep -v 'dotfile(s) compared' | sed '$d' | grep -v '^+++\|^---' > ${tmpd}/normal
|
cd ${ddpath} | ${bin} compare -c ${cfg} 2>/dev/null | grep -v '=>' | grep -v '\->' | grep -v 'dotfile(s) compared' | sed '$d' | grep -v '^+++\|^---' > ${tmpd}/normal
|
||||||
diff -u -r ${tmpd}/singlefile ${basedir}/dotfiles/${tmpd}/singlefile | grep -v '^+++\|^---' > ${tmpd}/real
|
diff -u -r ${tmpd}/singlefile ${basedir}/dotfiles/${tmpd}/singlefile | grep -v '^+++\|^---' > ${tmpd}/real
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -96,7 +96,7 @@ sed '/dotpath: dotfiles/a \ \ diff_command: "diff -r {0} {1}"' ${cfg} > ${cfg2}
|
|||||||
# normal diff
|
# normal diff
|
||||||
echo "[+] comparing with normal diff"
|
echo "[+] comparing with normal diff"
|
||||||
set +e
|
set +e
|
||||||
cd ${ddpath} | ${bin} compare -c ${cfg2} 2>&1 | grep -v '=>' | grep -v '\->' | grep -v 'dotfile(s) compared' | sed '$d' > ${tmpd}/unified
|
cd ${ddpath} | ${bin} compare -c ${cfg2} 2>/dev/null | grep -v '=>' | grep -v '\->' | grep -v 'dotfile(s) compared' | sed '$d' > ${tmpd}/unified
|
||||||
diff -r ${tmpd}/singlefile ${basedir}/dotfiles/${tmpd}/singlefile > ${tmpd}/real
|
diff -r ${tmpd}/singlefile ${basedir}/dotfiles/${tmpd}/singlefile > ${tmpd}/real
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
@@ -113,7 +113,7 @@ sed '/dotpath: dotfiles/a \ \ diff_command: "echo fakediff"' ${cfg} > ${cfg3}
|
|||||||
# fake diff
|
# fake diff
|
||||||
echo "[+] comparing with fake diff"
|
echo "[+] comparing with fake diff"
|
||||||
set +e
|
set +e
|
||||||
cd ${ddpath} | ${bin} compare -c ${cfg3} 2>&1 | grep -v '=>' | grep -v '\->' | grep -v 'dotfile(s) compared' | sed '$d' > ${tmpd}/fake
|
cd ${ddpath} | ${bin} compare -c ${cfg3} 2>/dev/null | grep -v '=>' | grep -v '\->' | grep -v 'dotfile(s) compared' | sed '$d' > ${tmpd}/fake
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# verify
|
# verify
|
||||||
|
|||||||
Reference in New Issue
Block a user