From e556155c40e91ebf026c5023aa3591d2398229ea Mon Sep 17 00:00:00 2001 From: Stephan Bosch <stephan@rename-it.nl> Date: Wed, 20 Nov 2013 19:34:28 +0100 Subject: [PATCH] Small improvements to the test suite. --- tests/test-header.svtest | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/tests/test-header.svtest b/tests/test-header.svtest index cb201b0a9..138fb82ef 100644 --- a/tests/test-header.svtest +++ b/tests/test-header.svtest @@ -1,4 +1,5 @@ require "vnd.dovecot.testsuite"; +require "variables"; /* * ## RFC 5228, Section 5.7. Test header (page 29) ## @@ -145,7 +146,7 @@ From: stephan@example.org To: nico@frop.example.com Subject: Help X-A: Text -X-B: Text +X-B: Text Text . @@ -153,15 +154,24 @@ Text test "Ignoring whitespace" { 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" { - 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" { - 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}`)"; } } -- GitLab