Skip to content
Snippets Groups Projects
Commit e556155c authored by Stephan Bosch's avatar Stephan Bosch
Browse files

Small improvements to the test suite.

parent ae7d86cd
No related branches found
No related tags found
No related merge requests found
require "vnd.dovecot.testsuite"; require "vnd.dovecot.testsuite";
require "variables";
/* /*
* ## RFC 5228, Section 5.7. Test header (page 29) ## * ## RFC 5228, Section 5.7. Test header (page 29) ##
...@@ -145,7 +146,7 @@ From: stephan@example.org ...@@ -145,7 +146,7 @@ From: stephan@example.org
To: nico@frop.example.com To: nico@frop.example.com
Subject: Help Subject: Help
X-A: Text X-A: Text
X-B: Text X-B: Text
Text Text
. .
...@@ -153,15 +154,24 @@ Text ...@@ -153,15 +154,24 @@ Text
test "Ignoring whitespace" { test "Ignoring whitespace" {
if not header :is "x-a" "Text" { if not header :is "x-a" "Text" {
test_fail "header test does not strip leading whitespace"; if header :matches "x-a" "*" {
set "header" "${1}";
}
test_fail "header test does not strip leading whitespace (header=`${header}`)";
} }
if not header :is "x-b" "Text" { if not header :is "x-b" "Text" {
test_fail "header test does not strip trailing whitespace"; if header :matches "x-b" "*" {
set "header" "${1}";
}
test_fail "header test does not strip trailing whitespace (header=`${header}`)";
} }
if not header :is "subject" "Help" { if not header :is "subject" "Help" {
test_fail "header test does not strip both leading and trailing whitespace"; if header :matches "subject" "*" {
set "header" "${1}";
}
test_fail "header test does not strip both leading and trailing whitespace (header=`${header}`)";
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment

Consent

On this website, we use the web analytics service Matomo to analyze and review the use of our website. Through the collected statistics, we can improve our offerings and make them more appealing for you. Here, you can decide whether to allow us to process your data and set corresponding cookies for these purposes, in addition to technically necessary cookies. Further information on data protection—especially regarding "cookies" and "Matomo"—can be found in our privacy policy. You can withdraw your consent at any time.