source: trunk/server/source3/script/tests/test_failure.sh

Last change on this file was 745, checked in by Silvan Scherrer, 13 years ago

Samba Server: updated trunk to 3.6.0

File size: 653 bytes
Line 
1#!/bin/sh
2#
3# Blackbox test that should fail one of three subtests.
4#
5# Copyright (C) 2011 Michael Adam <obnox@samba.org>
6
7# include the blackbox subunit infrastructure
8# if not run from classical s3 test script:
9test x"$TEST_FUNCTIONS_SH" != x"INCLUDED" && {
10 incdir=`dirname $0`/../../../testprogs/blackbox
11 . $incdir/subunit.sh
12}
13
14failed=0
15
16test_failure()
17{
18 false
19}
20
21test_success()
22{
23 true
24}
25
26testit "success" \
27 test_success || \
28 failed=`expr $failed + 1`
29
30testit "failure" \
31 test_failure || \
32 failed=`expr $failed + 1`
33
34testit "success" \
35 test_success || \
36 failed=`expr $failed + 1`
37
38testok $0 $failed
39
Note: See TracBrowser for help on using the repository browser.