summaryrefslogtreecommitdiff
path: root/testsuite/nsswitch/finger.exp
blob: 8a57f1c80961eab4a071e22b01f75fb85f8e544a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#
# @(#) Test default domain users resolve using the finger command
#

load_lib util-defs.exp
load_lib "$srcdir/config/env.exp"
load_lib "$srcdir/config/default-nt-names.exp"

# Look up domain users using finger.  This should test getpwnam()

foreach { user } $domain_users {
    if {[util_test "finger" "-m $user" "" "no such user"] < 1} {
        fail "finger -m $user"
    } else {
        pass "finger -m $user"
    }
}

# Run finger without the -m to also test set/get/endpwent()

foreach { user } $domain_users {
    if {[util_test "finger" "$user" "" "no such user"] < 1} {
        fail "finger $user"
    } else {
        pass "finger $user"
    }
}