From e9a22d5165c2dda5a0e10506977081222549a8eb Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 14 Oct 2012 08:55:36 +0200 Subject: o Making sure ./app can be symlinked to an installation. o More tests. --- test/utils.bash | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 test/utils.bash (limited to 'test/utils.bash') diff --git a/test/utils.bash b/test/utils.bash new file mode 100644 index 0000000..eacabe8 --- /dev/null +++ b/test/utils.bash @@ -0,0 +1,24 @@ +#!/bin/bash + +workdir=test-run + +# TODO: assert that the exit code is 1 for 'usage' outputs. +exit_usage=1 +exit_usage_wrong=0 + +echo_lines() { + for line in "${lines[@]}"; do echo $line; done +} + +APPSH=$(pwd)/app + +setup() { + rm -rf $BATS_TMPDIR/app.sh + mkdir $BATS_TMPDIR/app.sh + cd $BATS_TMPDIR/app.sh + ln -s $APPSH +} + +app() { + run ./app "$@" +} -- cgit v1.2.3