aio_fork: Fix CID 1273291 Uninitialized scalar variable
[Samba.git] / testsuite / nsswitch / finger.exp
blob36bab8e19901f12b3bc946de91dad935510245d8
2 # @(#) Test default domain users resolve using the finger command
5 load_lib util-defs.exp
7 set output [util_start "bin/wbinfo" "-u"]
8 if { [regexp "Error" $output] } {
9 fail "error running wbinfo"
10 return
13 set user_list [split $output "\n"]
15 # Look up all users using finger -m. This should test getpwnam()
17 foreach { user } $user_list {
18 set output [util_start "finger" "-m \"$user\"" "" "no such user"]
19 verbose $output
21 if { [regexp "no such user" $output] } {
22 fail "finger -m $user"
23 } else {
24 pass "finger -m $user"
28 # Run finger without the -m to also test set/get/endpwent()
30 foreach { user } $user_list {
31 set output [util_start "finger" "\"$user\""]
32 verbose $output
34 if { [regexp "no such user" $output] } {
35 fail "finger $user"
36 } else {
37 pass "finger $user"