From 6d179d5ef22fcdfc4802db3fbb37f88190186367 Mon Sep 17 00:00:00 2001 From: Roman Fiedler Date: Fri, 3 Feb 2023 20:26:08 +0000 Subject: Testsuite: testcase for empty-var followed by expansion-op Supplements: 70069b65a39a --- test/confs/0634 | 13 ++++++++ test/scripts/0000-Basic/0634 | 24 ++++++++++++++ test/stderr/0634 | 75 ++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 112 insertions(+) create mode 100644 test/confs/0634 create mode 100644 test/scripts/0000-Basic/0634 create mode 100644 test/stderr/0634 (limited to 'test') diff --git a/test/confs/0634 b/test/confs/0634 new file mode 100644 index 000000000..f83614bbe --- /dev/null +++ b/test/confs/0634 @@ -0,0 +1,13 @@ +# Exim test configuration 0634 + +.include aux-var/std_conf_prefix + +acl_smtp_rcpt = check_acl_smtp_rcpt + +begin acl + +check_acl_smtp_rcpt: + + accept + set acl_m_empty = + set acl_m0 = ACL_RCPT diff --git a/test/scripts/0000-Basic/0634 b/test/scripts/0000-Basic/0634 new file mode 100644 index 000000000..cb08a025f --- /dev/null +++ b/test/scripts/0000-Basic/0634 @@ -0,0 +1,24 @@ +# Empty variables +# +exim -DACL_RCPT='$acl_c_empty' -bh V4NET.0.0.0 +EHLO test1 +MAIL FROM: +RCPT TO: +QUIT +**** +# expanson-operator after empty variable +exim -DACL_RCPT='$acl_c_empty${hexquote:A}' -bh V4NET.0.0.0 +EHLO test2 +MAIL FROM: +RCPT TO: +QUIT +**** +# expanson-item after empty variable +exim -DACL_RCPT='$acl_c_empty${listquote{:}{A}}' -bh V4NET.0.0.0 +EHLO test3 +MAIL FROM: +RCPT TO: +QUIT +**** +# +no_stdout_check diff --git a/test/stderr/0634 b/test/stderr/0634 new file mode 100644 index 000000000..5e4fbe08e --- /dev/null +++ b/test/stderr/0634 @@ -0,0 +1,75 @@ +>>> host in hosts_connection_nolog? no (option unset) +>>> host in host_lookup? no (option unset) +>>> host in host_reject_connection? no (option unset) +>>> host in sender_unqualified_hosts? no (option unset) +>>> host in recipient_unqualified_hosts? no (option unset) +>>> host in helo_verify_hosts? no (option unset) +>>> host in helo_try_verify_hosts? no (option unset) +>>> host in helo_accept_junk_hosts? no (option unset) +>>> test1 in helo_lookup_domains? +>>> list element: @ +>>> list element: @[] +>>> test1 in helo_lookup_domains? no (end of list) +>>> host in dsn_advertise_hosts? no (option unset) +>>> host in pipelining_advertise_hosts? +>>> list element: * +>>> host in pipelining_advertise_hosts? yes (matched "*") +>>> host in chunking_advertise_hosts? +>>> host in chunking_advertise_hosts? no (end of list) +>>> using ACL "check_acl_smtp_rcpt" +>>> processing "accept" (TESTSUITE/test-config 11) +>>> check set acl_m_empty = +>>> check set acl_m0 = $acl_c_empty +>>> = +>>> accept: condition test succeeded in ACL "check_acl_smtp_rcpt" +>>> end of ACL "check_acl_smtp_rcpt": ACCEPT +>>> host in hosts_connection_nolog? no (option unset) +>>> host in host_lookup? no (option unset) +>>> host in host_reject_connection? no (option unset) +>>> host in sender_unqualified_hosts? no (option unset) +>>> host in recipient_unqualified_hosts? no (option unset) +>>> host in helo_verify_hosts? no (option unset) +>>> host in helo_try_verify_hosts? no (option unset) +>>> host in helo_accept_junk_hosts? no (option unset) +>>> test2 in helo_lookup_domains? +>>> list element: @ +>>> list element: @[] +>>> test2 in helo_lookup_domains? no (end of list) +>>> host in dsn_advertise_hosts? no (option unset) +>>> host in pipelining_advertise_hosts? +>>> list element: * +>>> host in pipelining_advertise_hosts? yes (matched "*") +>>> host in chunking_advertise_hosts? +>>> host in chunking_advertise_hosts? no (end of list) +>>> using ACL "check_acl_smtp_rcpt" +>>> processing "accept" (TESTSUITE/test-config 11) +>>> check set acl_m_empty = +>>> check set acl_m0 = $acl_c_empty${hexquote:A} +>>> = A +>>> accept: condition test succeeded in ACL "check_acl_smtp_rcpt" +>>> end of ACL "check_acl_smtp_rcpt": ACCEPT +>>> host in hosts_connection_nolog? no (option unset) +>>> host in host_lookup? no (option unset) +>>> host in host_reject_connection? no (option unset) +>>> host in sender_unqualified_hosts? no (option unset) +>>> host in recipient_unqualified_hosts? no (option unset) +>>> host in helo_verify_hosts? no (option unset) +>>> host in helo_try_verify_hosts? no (option unset) +>>> host in helo_accept_junk_hosts? no (option unset) +>>> test3 in helo_lookup_domains? +>>> list element: @ +>>> list element: @[] +>>> test3 in helo_lookup_domains? no (end of list) +>>> host in dsn_advertise_hosts? no (option unset) +>>> host in pipelining_advertise_hosts? +>>> list element: * +>>> host in pipelining_advertise_hosts? yes (matched "*") +>>> host in chunking_advertise_hosts? +>>> host in chunking_advertise_hosts? no (end of list) +>>> using ACL "check_acl_smtp_rcpt" +>>> processing "accept" (TESTSUITE/test-config 11) +>>> check set acl_m_empty = +>>> check set acl_m0 = $acl_c_empty${listquote{:}{A}} +>>> = A +>>> accept: condition test succeeded in ACL "check_acl_smtp_rcpt" +>>> end of ACL "check_acl_smtp_rcpt": ACCEPT -- cgit v1.2.1