s4-dns: dlz_bind9: Fix ipv6 updates
[samba.git] / source3 / script / tests / test_failure.sh
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 incdir=`dirname $0`/../../../testprogs/blackbox
8 . $incdir/subunit.sh
9
10 failed=0
11
12 test_failure()
13 {
14         false
15 }
16
17 test_success()
18 {
19         true
20 }
21
22 testit "success" \
23         test_success || \
24         failed=`expr $failed + 1`
25
26 testit "failure" \
27         test_failure || \
28         failed=`expr $failed + 1`
29
30 testit "success" \
31         test_success || \
32         failed=`expr $failed + 1`
33
34 testok $0 $failed
35