summaryrefslogtreecommitdiff
path: root/source3/script/tests/test_net_misc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'source3/script/tests/test_net_misc.sh')
-rwxr-xr-xsource3/script/tests/test_net_misc.sh50
1 files changed, 50 insertions, 0 deletions
diff --git a/source3/script/tests/test_net_misc.sh b/source3/script/tests/test_net_misc.sh
new file mode 100755
index 0000000000..3ceb087885
--- /dev/null
+++ b/source3/script/tests/test_net_misc.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+# various tests for the "net" command
+
+NET="$VALGRIND ${NET:-$BINDIR/net} $CONFIGURATION"
+
+NETTIME="${NET} time"
+NETLOOKUP="${NET} lookup"
+
+incdir=`dirname $0`
+. $incdir/test_functions.sh
+
+failed=0
+
+test_time()
+{
+ PARAM="$1"
+
+ ${NETTIME} ${PARAM} -S localhost2
+}
+
+test_lookup()
+{
+ PARAM="$1"
+
+ ${NETLOOKUP} ${PARAM}
+}
+
+testit "get the time" \
+ test_time || \
+ failed=`expr $failed + 1`
+
+testit "get the system time" \
+ test_time system || \
+ failed=`expr $failed + 1`
+
+testit "get the tize zone" \
+ test_time zone || \
+ failed=`expr $failed + 1`
+
+testit "lookup the PDC" \
+ test_lookup pdc || \
+ failed=`expr $failed + 1`
+
+testit "lookup the master browser" \
+ test_lookup master || \
+ failed=`expr $failed + 1`
+
+testok $0 $failed
+