aboutsummaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-08-24 20:02:46 +0200
committerDanilo M. <danix@danix.xyz>2026-08-24 20:02:46 +0200
commitafeacd7cb99db7fcf4d677dbe8dd52b10e1284e0 (patch)
tree1011735f93e7aa2e3c3f1a14dfdc22c6d06fe5c0 /tests
parent86af01996dd702bdc3f837e96f154088e8b45538 (diff)
downloadqtmaildir-afeacd7cb99db7fcf4d677dbe8dd52b10e1284e0.tar.gz
qtmaildir-afeacd7cb99db7fcf4d677dbe8dd52b10e1284e0.zip
test(signatures): record what the quoted-delimiter test does not pin
The test asserts that a delimiter inside the quoted original is not treated as this message's signature, and it passes whether or not the code checks for that. Two mutations were measured against it and both stayed green: trimming the delimiter comparison so a quoted "> -- " matches, and making the quoted text one of the known signatures so the match guard could not be what refuses the removal. Neither changes the output. blockEnd() stops the block at the quote, so the quoted signature survives either way, and the behaviour is correct under both. The comment says so, so the next reader does not spend the same measurements discovering that the test cannot be sharpened. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01KEcn3u19xPqv6ggD15PG4c
Diffstat (limited to 'tests')
-rw-r--r--tests/test_signatures.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/test_signatures.cpp b/tests/test_signatures.cpp
index 5f01cf9..31f9eb4 100644
--- a/tests/test_signatures.cpp
+++ b/tests/test_signatures.cpp
@@ -247,6 +247,16 @@ void TestSignatures::aDelimiterInsideTheQuoteIsNotTheSignature()
// The quoted original carries the sender's own signature, quoted. A tail
// rule would find it, and under End it would append after it; the block
// must not be treated as this message's signature whichever way it goes.
+ //
+ // This test DOCUMENTS the case rather than pinning it, and that is worth
+ // knowing before trying to strengthen it. Two mutations were measured
+ // against it and both stayed green: trimming the delimiter comparison so
+ // that "> -- " matches, and making the quoted text one of the known
+ // signatures so the match guard could not be what refuses the removal.
+ // Neither changes the output, because blockEnd() stops the block at the
+ // quote, so the quoted signature survives whether or not the delimiter
+ // inside it is recognised. The behaviour is correct under both, and no
+ // assertion on the result can separate them.
const QStringList known = { QStringLiteral("Jane Doe") };
const QString buffer = QStringLiteral(
"My reply.\n"