From 8daa83a594a2e98f39d764422bfbdbc62c9efd44 Mon Sep 17 00:00:00 2001 From: Daniel Baumann Date: Fri, 19 Apr 2024 19:20:00 +0200 Subject: Adding upstream version 2:4.20.0+dfsg. Signed-off-by: Daniel Baumann --- source3/script/tests/test_testparm_s3.sh | 150 +++++++++++++++++++++++++++++++ 1 file changed, 150 insertions(+) create mode 100755 source3/script/tests/test_testparm_s3.sh (limited to 'source3/script/tests/test_testparm_s3.sh') diff --git a/source3/script/tests/test_testparm_s3.sh b/source3/script/tests/test_testparm_s3.sh new file mode 100755 index 0000000..a11ef85 --- /dev/null +++ b/source3/script/tests/test_testparm_s3.sh @@ -0,0 +1,150 @@ +#!/bin/sh + +# Tests for lp_load() via testparm. +# +# The main purpose (for now) is to test all the special handlers +# and the macro expansions. + +if [ $# -lt 1 ]; then + cat <${TEMP_CONFFILE} <${TEMP_CONFFILE} <${TEMP_CONFFILE} <&1) + status=$? + if [ "$status" = "0" ]; then + echo "$output" | grep --quiet 'WARNING: The "lsa over netlogon " option is deprecated' + status=$? + if [ "$status" = "1" ]; then + subunit_pass_test "$name" + else + echo $output | subunit_fail_test "$name" + fi + else + echo $output | subunit_fail_test "$name" + fi +} + +testit "name resolve order = lmhosts wins host bcast" \ + test_one_global_option "name resolve order = lmhosts wins host bcast" || + failed=$(expr ${failed} + 1) + +testit_expect_failure "name resolve order = bad wins host bcast" \ + test_one_global_option "name resolve order = bad wins host bcast" || + failed=$(expr ${failed} + 1) + +testit_expect_failure "name resolve order = lmhosts bad host bcast" \ + test_one_global_option "name resolve order = lmhosts bad host bcast" || + failed=$(expr ${failed} + 1) + +testit_expect_failure "name resolve order = lmhosts wins bad bcast" \ + test_one_global_option "name resolve order = lmhosts wins bad bcast" || + failed=$(expr ${failed} + 1) + +testit_expect_failure "name resolve order = lmhosts wins host bad" \ + test_one_global_option "name resolve order = lmhosts wins host bad" || + failed=$(expr ${failed} + 1) + +testit "netbios name" \ + test_one_global_option "netbios name = funky" || + failed=$(expr ${failed} + 1) + +testit "netbios aliases" \ + test_one_global_option "netbios aliases = funky1 funky2 funky3" || + failed=$(expr ${failed} + 1) + +testit "netbios scope" \ + test_one_global_option "netbios scope = abc" || + failed=$(expr ${failed} + 1) + +testit "workgroup" \ + test_one_global_option "workgroup = samba" || + failed=$(expr ${failed} + 1) + +testit "display charset" \ + test_one_global_option "display charset = UTF8" || + failed=$(expr ${failed} + 1) + +testit "ldap debug level" \ + test_one_global_option "ldap debug level = 7" || + failed=$(expr ${failed} + 1) + +for LETTER in U G D I i L N M R T a d h m v w V; do + testit "include with %${LETTER} macro expansion" \ + test_include_expand_macro "${LETTER}" || + failed=$(expr ${failed} + 1) +done + +testit "copy" \ + test_copy || + failed=$(expr ${failed} + 1) + +test_testparm_deprecated "test_deprecated_warning_printed" +test_testparm_deprecated_suppress "test_deprecated_warning_suppressed" + +rm -f ${TEMP_CONFFILE} + +testok $0 ${failed} -- cgit v1.2.3