summaryrefslogtreecommitdiff
path: root/testsuite/nsswitch/longarg.exp
blob: e1d0eda9ccb200598c308e2db1c369b197fad3d3 (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
28
29
#
# @(#) Test handling of long arguments passed to various nss functions
#

load_lib compile.exp
load_lib util-defs.exp

# Run tests from C source files

set longarg_tests [list \
	{ "long arg to getpwnam()" "longarg_getpwnam" } \
	{ "long arg to getgrnam()" "longarg_getgrnam" } \
	]

foreach { test } $longarg_tests {
    set test_desc [lindex $test 0]
    set test_file [lindex $test 1]

    simple_make "longarg" $test_file
    set output [util_start "$srcdir/$subdir/$test_file" ]

    if { [regexp "PASS" $output] } {
        pass $test_desc
        file delete "$srcdir/$subdir/$test_file" "$srcdir/$subdir/$test_file.o"
    } else {
        fail $test_desc
        puts $output
    }
}