From 47b8548c78fc10aa43d3391b8a06b5207b180a56 Mon Sep 17 00:00:00 2001 From: Stephan Bosch <stephan@rename-it.nl> Date: Sun, 27 Jul 2008 17:52:34 +0200 Subject: [PATCH] Envelope: forgot to add new test case. --- .../tests/extensions/envelope.svtest | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 src/testsuite/tests/extensions/envelope.svtest diff --git a/src/testsuite/tests/extensions/envelope.svtest b/src/testsuite/tests/extensions/envelope.svtest new file mode 100644 index 000000000..6dde173f5 --- /dev/null +++ b/src/testsuite/tests/extensions/envelope.svtest @@ -0,0 +1,29 @@ +require "vnd.dovecot.testsuite"; + +require "envelope"; + +test_set "envelope.from" ""; +test_set "envelope.to" "stephan@rename-it.nl"; + +test "Envelope - from empty" { + if not envelope :all :is "from" "" { + test_fail "failed to :all :is match <> return path"; + } + + if not envelope :all :contains "from" "" { + test_fail "failed to :all :contains match <> return path"; + } + + if not envelope :domain :is "from" "" { + test_fail "failed to :domain :is match <> return path"; + } + + if not envelope :domain :contains "from" "" { + test_fail "failed to :domain :contains match <> return path"; + } + + if envelope :all :is "from" "nico@vestingbar.nl" { + test_fail "envelope test matches nonsense"; + } +} + -- GitLab