man pages: Add documentation for new cluster parameters.
[Samba/gebeck_regimport.git] / testsuite / server / masktest.exp
blob532291bffb826d0b500edf937181c4dae2ec179c
2 # Test various things using the masktest program
5 # Initialisation
7 load_lib env-single.exp
9 set timeout 10
11 # Test each wildcard individually, then all together at once
13 set testlist {{"abc" "<"} {"abc" ">"} {"abc" "\""} {"abc" "?"} {"abc" "*"} \
14 {"abc" "."} {"abc" "<>\"?*."}}
16 foreach { test } $testlist {
18 set got_output 0
19 set fail 0
21 # Spawn masktest
23 spawn bin/masktest //$server/$share -U $user -n 1000 -a \
24 -f [lindex $test 0] -m [concat [lindex $test 0] [lindex $test 1]]
26 # Check output
28 while 1 {
29 expect {
30 -re "(...) (...) \[0-9\]+ mask=" {
31 if { $expect_out(1,string) != $expect_out(2,string) } {
32 fail "masktest [lindex $test 1]"
33 puts $expect_out(0,string);
34 set fail 1
35 break;
36 } else {
37 set got_output 1
40 eof { break }
44 # Produce result
46 set testname "[lindex $test 0] [lindex $test 1]"
48 if {$got_output} {
49 if {$fail} {
50 fail "masktest $testname"
51 } else {
52 pass "masktest $testname"
54 } else {
55 perror "no output seen for test $testname"