mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-12 08:58:29 +00:00
add test for bug #226
This commit is contained in:
@@ -99,10 +99,14 @@ dotfiles:
|
|||||||
f_ghi:
|
f_ghi:
|
||||||
dst: ${tmpd}/ghi
|
dst: ${tmpd}/ghi
|
||||||
src: ghi
|
src: ghi
|
||||||
|
f_asub:
|
||||||
|
dst: ${tmpd}/subdir/sub/asub
|
||||||
|
src: subdir/sub/asub
|
||||||
profiles:
|
profiles:
|
||||||
p2:
|
p2:
|
||||||
dotfiles:
|
dotfiles:
|
||||||
- f_def
|
- f_def
|
||||||
|
- f_asub
|
||||||
psubsub:
|
psubsub:
|
||||||
dotfiles:
|
dotfiles:
|
||||||
- f_sub
|
- f_sub
|
||||||
@@ -125,6 +129,10 @@ echo "{{@@ _dotfile_abs_dst @@}}" >> ${tmps}/dotfiles/zzz
|
|||||||
echo "sub" > ${tmps}/dotfiles/sub
|
echo "sub" > ${tmps}/dotfiles/sub
|
||||||
echo "{{@@ _dotfile_abs_dst @@}}" >> ${tmps}/dotfiles/sub
|
echo "{{@@ _dotfile_abs_dst @@}}" >> ${tmps}/dotfiles/sub
|
||||||
|
|
||||||
|
mkdir -p ${tmps}/dotfiles-other/subdir/sub
|
||||||
|
echo "subsub" > ${tmps}/dotfiles-other/subdir/sub/asub
|
||||||
|
echo "{{@@ _dotfile_abs_dst @@}}" >> ${tmps}/dotfiles-other/subdir/sub/asub
|
||||||
|
|
||||||
# install
|
# install
|
||||||
cd ${ddpath} | ${bin} files -c ${cfg1} -p p0 -V | grep f_def
|
cd ${ddpath} | ${bin} files -c ${cfg1} -p p0 -V | grep f_def
|
||||||
cd ${ddpath} | ${bin} files -c ${cfg1} -p p1 -V | grep f_abc
|
cd ${ddpath} | ${bin} files -c ${cfg1} -p p1 -V | grep f_abc
|
||||||
@@ -137,6 +145,35 @@ cd ${ddpath} | ${bin} files -c ${cfg1} -p psubsub -V | grep f_sub
|
|||||||
cd ${ddpath} | ${bin} install -c ${cfg1} -p p2 -V
|
cd ${ddpath} | ${bin} install -c ${cfg1} -p p2 -V
|
||||||
cd ${ddpath} | ${bin} compare -c ${cfg1} -p p2 -V
|
cd ${ddpath} | ${bin} compare -c ${cfg1} -p p2 -V
|
||||||
|
|
||||||
|
# test with non-existing dotpath this time
|
||||||
|
rm -rf ${tmps}/dotfiles
|
||||||
|
cat > ${cfg1} << _EOF
|
||||||
|
config:
|
||||||
|
backup: true
|
||||||
|
create: true
|
||||||
|
dotpath: dotfiles
|
||||||
|
import_configs:
|
||||||
|
- ${cfg2}
|
||||||
|
dotfiles:
|
||||||
|
profiles:
|
||||||
|
_EOF
|
||||||
|
cat > ${cfg2} << _EOF
|
||||||
|
config:
|
||||||
|
backup: true
|
||||||
|
create: true
|
||||||
|
dotpath: dotfiles-other
|
||||||
|
dotfiles:
|
||||||
|
f_asub:
|
||||||
|
dst: ${tmpd}/subdir/sub/asub
|
||||||
|
src: subdir/sub/asub
|
||||||
|
profiles:
|
||||||
|
p2:
|
||||||
|
dotfiles:
|
||||||
|
- f_asub
|
||||||
|
_EOF
|
||||||
|
cd ${ddpath} | ${bin} install -c ${cfg1} -p p2 -V
|
||||||
|
cd ${ddpath} | ${bin} compare -c ${cfg1} -p p2 -V
|
||||||
|
|
||||||
## CLEANING
|
## CLEANING
|
||||||
rm -rf ${tmps} ${tmpd}
|
rm -rf ${tmps} ${tmpd}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user