diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-10-20 18:09:50 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-10-20 20:23:30 +0200 |
commit | 11cf17750885324a58a68d237b0ac29bc3a6269b (patch) | |
tree | 474da312f12a82629b495b5901c10ea49b08e98c /test/utils.bash | |
parent | d2e3a3795f345fd78ead2cf06b1134b46f9d4bc4 (diff) | |
download | app.sh-11cf17750885324a58a68d237b0ac29bc3a6269b.tar.gz app.sh-11cf17750885324a58a68d237b0ac29bc3a6269b.tar.bz2 app.sh-11cf17750885324a58a68d237b0ac29bc3a6269b.tar.xz app.sh-11cf17750885324a58a68d237b0ac29bc3a6269b.zip |
o Making all app-conf options except import use <-l location>.
o Setting $HOME to the temporary area when testing.
o Adding test docs for app-conf.
Diffstat (limited to 'test/utils.bash')
-rw-r--r-- | test/utils.bash | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/test/utils.bash b/test/utils.bash index 26be39d..88dd889 100644 --- a/test/utils.bash +++ b/test/utils.bash @@ -15,6 +15,11 @@ setup() { rm -rf $BATS_TMPDIR/app.sh mkdir $BATS_TMPDIR/app.sh + + HOME=$BATS_TMPDIR/app.sh-home + mkdir -p $HOME + rm -f $HOME/.appconfig + cd $BATS_TMPDIR/app.sh REPO=$BATS_TMPDIR/repo @@ -49,9 +54,19 @@ install_artifact() { -DgroupId=org.example -DartifactId=app-a -Dversion=$version -Dpackaging=zip } +check_status=yes + app() { echo app $@ run $APPSH_HOME/app $@ + echo_lines + + if [ "$check_status" = yes ] + then + eq '$status' 0 + fi + + check_status=yes } app_libexec() { @@ -60,6 +75,15 @@ app_libexec() { echo libexec/$@ shift run "$x" $@ + + echo_lines + + if [ "$check_status" = yes ] + then + eq '$status' 0 + fi + + check_status=yes } fix_path_uname=`uname -s` |