mirror of
https://github.com/deadc0de6/dotdrop.git
synced 2026-02-04 17:24:46 +00:00
testing
This commit is contained in:
@@ -52,6 +52,7 @@ tmpd=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
|
|||||||
#echo "dotfile destination: ${tmpd}"
|
#echo "dotfile destination: ${tmpd}"
|
||||||
# workdir
|
# workdir
|
||||||
tmpw=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
|
tmpw=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
|
||||||
|
export DOTDROP_WORKDIR="${tmpw}"
|
||||||
# temp
|
# temp
|
||||||
tmpa=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
|
tmpa=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
|
||||||
|
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ tmpd=`mktemp -d -p ${HOME} --suffix='-dotdrop-tests' || mktemp -d`
|
|||||||
echo "dotfiles destination: ${tmpd}"
|
echo "dotfiles destination: ${tmpd}"
|
||||||
# the workdir
|
# the workdir
|
||||||
tmpw=`mktemp -d -p ${HOME} --suffix='-dotdrop-tests' || mktemp -d`
|
tmpw=`mktemp -d -p ${HOME} --suffix='-dotdrop-tests' || mktemp -d`
|
||||||
|
export DOTDROP_WORKDIR="${tmpw}"
|
||||||
echo "workdir: ${tmpw}"
|
echo "workdir: ${tmpw}"
|
||||||
|
|
||||||
clear_on_exit "${tmps}"
|
clear_on_exit "${tmps}"
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ tmpd=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
|
|||||||
echo "dotfiles destination: ${tmpd}"
|
echo "dotfiles destination: ${tmpd}"
|
||||||
# the workdir
|
# the workdir
|
||||||
tmpw=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
|
tmpw=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
|
||||||
|
export DOTDROP_WORKDIR="${tmpw}"
|
||||||
echo "workdir: ${tmpw}"
|
echo "workdir: ${tmpw}"
|
||||||
|
|
||||||
clear_on_exit "${tmps}"
|
clear_on_exit "${tmps}"
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ tmpd=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
|
|||||||
echo "dotfiles destination: ${tmpd}"
|
echo "dotfiles destination: ${tmpd}"
|
||||||
# the workdir
|
# the workdir
|
||||||
tmpw=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
|
tmpw=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
|
||||||
|
export DOTDROP_WORKDIR="${tmpw}"
|
||||||
echo "workdir: ${tmpw}"
|
echo "workdir: ${tmpw}"
|
||||||
|
|
||||||
clear_on_exit "${tmps}"
|
clear_on_exit "${tmps}"
|
||||||
|
|||||||
@@ -52,6 +52,7 @@ mkdir -p ${tmps}/dotfiles
|
|||||||
tmpd=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
|
tmpd=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
|
||||||
#echo "dotfile destination: ${tmpd}"
|
#echo "dotfile destination: ${tmpd}"
|
||||||
tmpw=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
|
tmpw=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
|
||||||
|
export DOTDROP_WORKDIR="${tmpw}"
|
||||||
|
|
||||||
clear_on_exit "${tmps}"
|
clear_on_exit "${tmps}"
|
||||||
clear_on_exit "${tmpd}"
|
clear_on_exit "${tmpd}"
|
||||||
@@ -132,7 +133,8 @@ grep 'file1' ${tmpd}/abc2
|
|||||||
grep 'file2' ${tmpd}/def/afile
|
grep 'file2' ${tmpd}/def/afile
|
||||||
grep 'This dotfile is managed using dotdrop' ${tmpd}/ghi
|
grep 'This dotfile is managed using dotdrop' ${tmpd}/ghi
|
||||||
grep 'This dotfile is managed using dotdrop' ${tmpd}/jkl/anotherfile
|
grep 'This dotfile is managed using dotdrop' ${tmpd}/jkl/anotherfile
|
||||||
[[ $(realpath --relative-base="${tmpw}" -- "$(realpath ${tmpd}/ghi)") =~ ^/ ]] && echo "ghi not subpath of workdir" && exit 1
|
|
||||||
|
[[ $(realpath --relative-base="${tmpw}" -- "$(realpath ${tmpd}/ghi)") =~ "^/" ]] && echo "ghi not subpath of workdir" && exit 1
|
||||||
[[ $(realpath --relative-base="${tmpw}" -- "$(realpath ${tmpd}/jkl)") =~ ^/ ]] && echo "jkl not subpath of workdir" && exit 1
|
[[ $(realpath --relative-base="${tmpw}" -- "$(realpath ${tmpd}/jkl)") =~ ^/ ]] && echo "jkl not subpath of workdir" && exit 1
|
||||||
|
|
||||||
## TODO test with install path children of dotpath
|
## TODO test with install path children of dotpath
|
||||||
|
|||||||
@@ -55,6 +55,7 @@ tmpd=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
|
|||||||
echo "dotfiles destination: ${tmpd}"
|
echo "dotfiles destination: ${tmpd}"
|
||||||
# the workdir
|
# the workdir
|
||||||
tmpw=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
|
tmpw=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
|
||||||
|
export DOTDROP_WORKDIR="${tmpw}"
|
||||||
echo "workdir: ${tmpw}"
|
echo "workdir: ${tmpw}"
|
||||||
|
|
||||||
clear_on_exit "${tmps}"
|
clear_on_exit "${tmps}"
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ tmp=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
|
|||||||
|
|
||||||
tmpf="${tmp}/dotfiles"
|
tmpf="${tmp}/dotfiles"
|
||||||
tmpw="${tmp}/workdir"
|
tmpw="${tmp}/workdir"
|
||||||
|
export DOTDROP_WORKDIR="${tmpw}"
|
||||||
|
|
||||||
mkdir -p ${tmpf}
|
mkdir -p ${tmpf}
|
||||||
echo "dotfiles source (dotpath): ${tmpf}"
|
echo "dotfiles source (dotpath): ${tmpf}"
|
||||||
|
|||||||
@@ -53,6 +53,7 @@ tmp=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
|
|||||||
|
|
||||||
tmpf="${tmp}/dotfiles"
|
tmpf="${tmp}/dotfiles"
|
||||||
tmpw="${tmp}/workdir"
|
tmpw="${tmp}/workdir"
|
||||||
|
export DOTDROP_WORKDIR="${tmpw}"
|
||||||
|
|
||||||
mkdir -p ${tmpf}
|
mkdir -p ${tmpf}
|
||||||
echo "dotfiles source (dotpath): ${tmpf}"
|
echo "dotfiles source (dotpath): ${tmpf}"
|
||||||
@@ -113,6 +114,7 @@ tmp=`mktemp -d --suffix='-dotdrop-tests' || mktemp -d`
|
|||||||
|
|
||||||
tmpf="${tmp}/dotfiles"
|
tmpf="${tmp}/dotfiles"
|
||||||
tmpw="${tmp}/workdir"
|
tmpw="${tmp}/workdir"
|
||||||
|
export DOTDROP_WORKDIR="${tmpw}"
|
||||||
|
|
||||||
mkdir -p ${tmpf}
|
mkdir -p ${tmpf}
|
||||||
echo "dotfiles source (dotpath): ${tmpf}"
|
echo "dotfiles source (dotpath): ${tmpf}"
|
||||||
|
|||||||
Reference in New Issue
Block a user