X-Git-Url: https://git.donarmstrong.com/?a=blobdiff_plain;f=tests%2Ftests.sh;h=d6da8842f1e756fbe6ce841743c644b8502dc28a;hb=474c1ab3c099b15d691f780233c5192d1a78774e;hp=b22cd02480d73d79635c3461bbd069c956e33876;hpb=2940d04eddd7cb018c0efa84265c3aba5e2aade9;p=wannabuild.git diff --git a/tests/tests.sh b/tests/tests.sh index b22cd02..d6da884 100755 --- a/tests/tests.sh +++ b/tests/tests.sh @@ -36,6 +36,18 @@ function assert_grep { fi } +function assert_grep_not { + cat > $testdir/assert_grep + if grep -q "$1" $testdir/assert_grep + then + echo "Could find unexpected \"$1\" in:" + cat $testdir/assert_grep + # We are in a pipe, i.e. a subshell, so kill the parent + kill -TERM $parent_pid + exit 1 + fi +} + cd "$(dirname $0)"/.. assert "[ -e bin/wanna-build ]"