From 8daa83a594a2e98f39d764422bfbdbc62c9efd44 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 19:20:00 +0200 Subject: Adding upstream version 2:4.20.0+dfsg. Signed-off-by: Daniel Baumann --- source3/script/tests/test_failure.sh | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100755 source3/script/tests/test_failure.sh (limited to 'source3/script/tests/test_failure.sh') diff --git a/source3/script/tests/test_failure.sh b/source3/script/tests/test_failure.sh new file mode 100755 index 0000000..7a2c9ae --- /dev/null +++ b/source3/script/tests/test_failure.sh @@ -0,0 +1,34 @@ +#!/bin/sh +# +# Blackbox test that should fail one of three subtests. +# +# Copyright (C) 2011 Michael Adam + +incdir=$(dirname $0)/../../../testprogs/blackbox +. $incdir/subunit.sh + +failed=0 + +test_failure() +{ + false +} + +test_success() +{ + true +} + +testit "success" \ + test_success || + failed=$(expr $failed + 1) + +testit "failure" \ + test_failure || + failed=$(expr $failed + 1) + +testit "success" \ + test_success || + failed=$(expr $failed + 1) + +testok $0 $failed -- cgit v1.2.3