mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-12 11:18:30 +00:00
more tests
This commit is contained in:
8
tests-ng/update-negative-ignore-all-but.sh
vendored
8
tests-ng/update-negative-ignore-all-but.sh
vendored
@@ -41,19 +41,21 @@ echo "[+] dotpath dir: ${basedir}/dotfiles"
|
||||
echo "[+] dst dir: ${tmpd}"
|
||||
|
||||
# dotfiles in dotdrop
|
||||
mkdir -p "${basedir}"/dotfiles/a/{b,c}
|
||||
mkdir -p "${basedir}"/dotfiles/a/{b,c,x}
|
||||
echo 'a' > "${basedir}"/dotfiles/a/b/abfile1
|
||||
echo 'a' > "${basedir}"/dotfiles/a/b/abfile2
|
||||
echo 'a' > "${basedir}"/dotfiles/a/b/abfile3
|
||||
echo 'a' > "${basedir}"/dotfiles/a/c/acfile
|
||||
echo 'a' > "${basedir}"/dotfiles/a/x/axfile
|
||||
|
||||
# filesystem
|
||||
mkdir -p "${tmpd}"/a/{b,c,d}
|
||||
mkdir -p "${tmpd}"/a/{b,c,d,x}
|
||||
echo "b" > "${tmpd}/a/b/abfile1"
|
||||
echo "b" > "${tmpd}/a/b/abfile2"
|
||||
echo "b" > "${tmpd}/a/b/abfile3"
|
||||
echo "b" > "${tmpd}/a/c/acfile"
|
||||
echo "b" > "${tmpd}/a/d/adfile"
|
||||
echo "b" > "${tmpd}/a/x/axfile"
|
||||
|
||||
clear_on_exit "${basedir}"
|
||||
clear_on_exit "${tmpd}"
|
||||
@@ -73,6 +75,7 @@ dotfiles:
|
||||
- "*"
|
||||
- "!*/c/**"
|
||||
- "!*/d/**"
|
||||
- "!x/"
|
||||
profiles:
|
||||
p1:
|
||||
dotfiles:
|
||||
@@ -90,6 +93,7 @@ grep_or_fail a "${basedir}"/dotfiles/a/b/abfile3
|
||||
grep_or_fail b "${basedir}"/dotfiles/a/c/acfile
|
||||
[ ! -s "${basedir}"/dotfiles/a/d/adfile ] && echo "adfile not updated" && exit 1
|
||||
grep_or_fail b "${basedir}"/dotfiles/a/d/adfile
|
||||
grep_or_fail a "${basedir}"/dotfiles/a/x/axfile
|
||||
|
||||
echo "OK"
|
||||
exit 0
|
||||
|
||||
Reference in New Issue
Block a user