diff --git a/src/testsuite/tests/match-types/matches.svtest b/src/testsuite/tests/match-types/matches.svtest index ea9bcb2b868e07291d264b4dbc8d35e226f1ee44..a808520c598e9aba76e50e77a5ace62519d2f420 100644 --- a/src/testsuite/tests/match-types/matches.svtest +++ b/src/testsuite/tests/match-types/matches.svtest @@ -8,7 +8,7 @@ Cc: me@example.com Cc: timo@dovecot.com X-Hufter: TRUE Subject: make your money very fast!!! -X-Spam-Score: 300 +X-Spam-Score: ********** X-Bullshit: 33333???a Message-ID: <90a02fe01fc25e131d0e9c4c45975894@example.com> @@ -85,6 +85,30 @@ test "MATCH-K" { } } +test "MATCH-L" { + if not header :matches "x-spam-score" "\\*\\*\\*\\*\\**" { + test_fail "should have matched"; + } +} + +test "MATCH-M" { + if not header :matches "x-spam-score" "\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*" { + test_fail "should have matched"; + } +} + +test "MATCH-N" { + if not header :matches "x-spam-score" "\\*\\*\\***\\*\\*" { + test_fail "should have matched"; + } +} + +test "MATCH-O" { + if not header :matches "x-spam-score" "\\*?\\*?\\*?\\*?\\*?" { + test_fail "should have matched"; + } +} + # Non-matching tests test "NO-MATCH-A" { @@ -153,3 +177,15 @@ test "NO-MATCH-K" { } } +test "NO-MATCH-L" { + if header :matches "x-spam-score" "\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*\\*" { + test_fail "should not have matched"; + } +} + + +test "NO-MATCH-M" { + if header :matches "x-spam-score" "\\*?\\*?\\*?\\*?\\*??" { + test_fail "should not have matched"; + } +}