Fix typo
[tprouty/samba.git] / source / script / tests / test_net_misc.sh
1 #!/bin/sh
2
3 # various tests for the "net" command
4
5 NET="$VALGRIND ${NET:-$BINDIR/net} $CONFIGURATION"
6
7 NETTIME="${NET} time"
8 NETLOOKUP="${NET} lookup"
9
10 incdir=`dirname $0`
11 . $incdir/test_functions.sh
12
13 failed=0
14
15 test_time()
16 {
17         PARAM="$1"
18
19         ${NETTIME} ${PARAM} -S localhost2
20 }
21
22 test_lookup()
23 {
24         PARAM="$1"
25
26         ${NETLOOKUP} ${PARAM}
27 }
28
29 testit "get the time" \
30         test_time || \
31         failed=`expr $failed + 1`
32
33 testit "get the system time" \
34         test_time system || \
35         failed=`expr $failed + 1`
36
37 testit "get the time zone" \
38         test_time zone || \
39         failed=`expr $failed + 1`
40
41 testit "lookup the PDC" \
42         test_lookup pdc || \
43         failed=`expr $failed + 1`
44
45 testit "lookup the master browser" \
46         test_lookup master || \
47         failed=`expr $failed + 1`
48
49 testok $0 $failed
50