[exim-cvs] Testsuite: testcase for empty-var followed by ex…

Góra strony
Delete this message
Reply to this message
Autor: Exim Git Commits Mailing List
Data:  
Dla: exim-cvs
Temat: [exim-cvs] Testsuite: testcase for empty-var followed by expansion-op
Gitweb: https://git.exim.org/exim.git/commitdiff/6d179d5ef22fcdfc4802db3fbb37f88190186367
Commit:     6d179d5ef22fcdfc4802db3fbb37f88190186367
Parent:     70069b65a39a7ba73a36fbd95371ff03cde1eb23
Author:     Roman Fiedler <roman.fiedler@???>
AuthorDate: Fri Feb 3 20:26:08 2023 +0000
Committer:  Jeremy Harris <jgh146exb@???>
CommitDate: Fri Feb 3 20:32:30 2023 +0000


    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(+)


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@???>
+RCPT TO:<test1@???>
+QUIT
+****
+# expanson-operator after empty variable
+exim -DACL_RCPT='$acl_c_empty${hexquote:A}' -bh V4NET.0.0.0
+EHLO test2
+MAIL FROM:<CALLER@???>
+RCPT TO:<test2@???>
+QUIT
+****
+# expanson-item after empty variable
+exim -DACL_RCPT='$acl_c_empty${listquote{:}{A}}' -bh V4NET.0.0.0
+EHLO test3
+MAIL FROM:<CALLER@???>
+RCPT TO:<test3@???>
+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