1
0
mirror of https://github.com/deadc0de6/dotdrop.git synced 2026-02-10 04:34:16 +00:00

add more tests

This commit is contained in:
deadc0de6
2018-09-24 20:23:55 +02:00
parent f5c9d494e7
commit cfd6cc4e72

View File

@@ -64,6 +64,7 @@ actions:
postaction: echo '{0} {1} {2}' > ${tmpa}/post postaction: echo '{0} {1} {2}' > ${tmpa}/post
nakedaction: echo '{0}' > ${tmpa}/naked nakedaction: echo '{0}' > ${tmpa}/naked
emptyaction: echo 'empty' > ${tmpa}/empty emptyaction: echo 'empty' > ${tmpa}/empty
tgtaction: echo 'tgt' > ${tmpa}/{0}
config: config:
backup: true backup: true
create: true create: true
@@ -75,8 +76,9 @@ dotfiles:
actions: actions:
- preaction test1 test2 - preaction test1 test2
- postaction test3 test4 test5 - postaction test3 test4 test5
- nakedaction test6 - nakedaction "test6 something"
- emptyaction - emptyaction
- tgtaction tgt
profiles: profiles:
p1: p1:
dotfiles: dotfiles:
@@ -101,11 +103,14 @@ grep test4 ${tmpa}/post >/dev/null
grep test5 ${tmpa}/post >/dev/null grep test5 ${tmpa}/post >/dev/null
[ ! -e ${tmpa}/naked ] && echo "naked arg action not found" && exit 1 [ ! -e ${tmpa}/naked ] && echo "naked arg action not found" && exit 1
grep test6 ${tmpa}/naked >/dev/null grep "test6 something" ${tmpa}/naked >/dev/null
[ ! -e ${tmpa}/empty ] && echo "empty arg action not found" && exit 1 [ ! -e ${tmpa}/empty ] && echo "empty arg action not found" && exit 1
grep empty ${tmpa}/empty >/dev/null grep empty ${tmpa}/empty >/dev/null
[ ! -e ${tmpa}/tgt ] && echo "tgt arg action not found" && exit 1
grep tgt ${tmpa}/tgt >/dev/null
## CLEANING ## CLEANING
rm -rf ${tmps} ${tmpd} ${tmpa} rm -rf ${tmps} ${tmpd} ${tmpa}