diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 17:47:29 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-05 17:47:29 +0000 |
commit | 4f5791ebd03eaec1c7da0865a383175b05102712 (patch) | |
tree | 8ce7b00f7a76baa386372422adebbe64510812d4 /testsuite/nsswitch/longarg.exp | |
parent | Initial commit. (diff) | |
download | samba-4f5791ebd03eaec1c7da0865a383175b05102712.tar.xz samba-4f5791ebd03eaec1c7da0865a383175b05102712.zip |
Adding upstream version 2:4.17.12+dfsg.upstream/2%4.17.12+dfsgupstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'testsuite/nsswitch/longarg.exp')
-rw-r--r-- | testsuite/nsswitch/longarg.exp | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/testsuite/nsswitch/longarg.exp b/testsuite/nsswitch/longarg.exp new file mode 100644 index 0000000..e1d0eda --- /dev/null +++ b/testsuite/nsswitch/longarg.exp @@ -0,0 +1,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 + } +} |