summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Fiedler <roman.fiedler@unparalleled.eu>2023-02-03 20:26:08 +0000
committerJeremy Harris <jgh146exb@wizmail.org>2023-02-03 20:32:30 +0000
commit6d179d5ef22fcdfc4802db3fbb37f88190186367 (patch)
tree2b125ae4049e81cc444f5419085056582637ea37
parent70069b65a39a7ba73a36fbd95371ff03cde1eb23 (diff)
downloadexim4-6d179d5ef22fcdfc4802db3fbb37f88190186367.tar.gz
Testsuite: testcase for empty-var followed by expansion-op
Supplements: 70069b65a39a
-rw-r--r--test/confs/063413
-rw-r--r--test/scripts/0000-Basic/063424
-rw-r--r--test/stderr/063475
3 files changed, 112 insertions, 0 deletions
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:<CALLER@test.ex>
+RCPT TO:<test1@test.ex>
+QUIT
+****
+# expanson-operator after empty variable
+exim -DACL_RCPT='$acl_c_empty${hexquote:A}' -bh V4NET.0.0.0
+EHLO test2
+MAIL FROM:<CALLER@test.ex>
+RCPT TO:<test2@test.ex>
+QUIT
+****
+# expanson-item after empty variable
+exim -DACL_RCPT='$acl_c_empty${listquote{:}{A}}' -bh V4NET.0.0.0
+EHLO test3
+MAIL FROM:<CALLER@test.ex>
+RCPT TO:<test3@test.ex>
+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