diff --git a/tests/extensions/vacation/smtp.svtest b/tests/extensions/vacation/smtp.svtest index a1e7ac54ce29b56887710f3ada21a4a846faaade..745192a10d545e8dddb108082e715538714bd044 100644 --- a/tests/extensions/vacation/smtp.svtest +++ b/tests/extensions/vacation/smtp.svtest @@ -1,6 +1,7 @@ require "vnd.dovecot.testsuite"; require "envelope"; require "vacation"; +require "variables"; test_set "message" text: From: stephan@example.org @@ -120,3 +121,37 @@ test "Envelope.to != To" { test_fail "envelope sender not null"; } } + +test_result_reset; + +test_set "message" text: +From: stephan@example.org +To: tss@example.net +Cc: colleague@example.net +Subject: Frop! + +Frop! +. +; + +test_set "envelope.from" "sirius@example.org"; +test_set "envelope.to" "colleague@example.net"; + +test "Cc" { + vacation "I am gone"; + + if not test_result_execute { + test_fail "failed to execute vacation"; + } + + test_message :smtp 0; + + if not address :is "from" "colleague@example.net" { + if address :matches "from" "*" { } + test_fail "from address incorrect: ${1}"; + } + + if not envelope :is "from" "" { + test_fail "envelope sender not null"; + } +}