mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-10 10:59:16 +00:00
more tests
This commit is contained in:
@@ -2,7 +2,7 @@
|
|||||||
# author: deadc0de6 (https://github.com/deadc0de6)
|
# author: deadc0de6 (https://github.com/deadc0de6)
|
||||||
# Copyright (c) 2023, deadc0de6
|
# Copyright (c) 2023, deadc0de6
|
||||||
#
|
#
|
||||||
# test variables tree (see #383)
|
# test nested variables (see #383)
|
||||||
# returns 1 in case of error
|
# returns 1 in case of error
|
||||||
#
|
#
|
||||||
|
|
||||||
@@ -49,6 +49,12 @@ variables:
|
|||||||
hello2: "hello2"
|
hello2: "hello2"
|
||||||
z2:
|
z2:
|
||||||
wow2: "{{@@ hello2 @@}}"
|
wow2: "{{@@ hello2 @@}}"
|
||||||
|
a:
|
||||||
|
suba:
|
||||||
|
subsuba: "submarine"
|
||||||
|
b:
|
||||||
|
subb:
|
||||||
|
subsubb:
|
||||||
dotfiles:
|
dotfiles:
|
||||||
f_abc:
|
f_abc:
|
||||||
dst: ${tmpd}/abc
|
dst: ${tmpd}/abc
|
||||||
@@ -63,6 +69,8 @@ _EOF
|
|||||||
# create the dotfile
|
# create the dotfile
|
||||||
echo "wow1={{@@ wow1 @@}}" > "${tmps}"/dotfiles/abc
|
echo "wow1={{@@ wow1 @@}}" > "${tmps}"/dotfiles/abc
|
||||||
echo "wow2={{@@ z2.wow2 @@}}" >> "${tmps}"/dotfiles/abc
|
echo "wow2={{@@ z2.wow2 @@}}" >> "${tmps}"/dotfiles/abc
|
||||||
|
echo "subsuba={{@@ a.suba.subsuba @@}}" >> "${tmps}"/dotfiles/abc
|
||||||
|
echo "subsubb={{@@ b.subb.subsubb @@}}" >> "${tmps}"/dotfiles/abc
|
||||||
|
|
||||||
# install
|
# install
|
||||||
cd "${ddpath}" | ${bin} install -f -c "${cfg}" -p p1 --verbose
|
cd "${ddpath}" | ${bin} install -f -c "${cfg}" -p p1 --verbose
|
||||||
@@ -72,6 +80,8 @@ cat "${tmpd}"/abc
|
|||||||
[ ! -e "${tmpd}"/abc ] && echo "abc not installed" && exit 1
|
[ ! -e "${tmpd}"/abc ] && echo "abc not installed" && exit 1
|
||||||
grep '^wow1=hello1' "${tmpd}"/abc >/dev/null
|
grep '^wow1=hello1' "${tmpd}"/abc >/dev/null
|
||||||
grep '^wow2=hello2' "${tmpd}"/abc >/dev/null
|
grep '^wow2=hello2' "${tmpd}"/abc >/dev/null
|
||||||
|
grep '^subsuba=submarine' "${tmpd}"/abc >/dev/null
|
||||||
|
grep '^subsubb=None' "${tmpd}"/abc >/dev/null
|
||||||
|
|
||||||
echo "OK"
|
echo "OK"
|
||||||
exit 0
|
exit 0
|
||||||
Reference in New Issue
Block a user