Testsuite: testcase for empty-var followed by expansion-op
authorRoman Fiedler <roman.fiedler@unparalleled.eu>
Fri, 3 Feb 2023 20:26:08 +0000 (20:26 +0000)
committerJeremy Harris <jgh146exb@wizmail.org>
Fri, 3 Feb 2023 20:32:30 +0000 (20:32 +0000)
Supplements: 70069b65a39a

test/confs/0634 [new file with mode: 0644]
test/scripts/0000-Basic/0634 [new file with mode: 0644]
test/stderr/0634 [new file with mode: 0644]

diff --git a/test/confs/0634 b/test/confs/0634
new file mode 100644 (file)
index 0000000..f83614b
--- /dev/null
@@ -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 (file)
index 0000000..cb08a02
--- /dev/null
@@ -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 (file)
index 0000000..5e4fbe0
--- /dev/null
@@ -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