test(fls): e-mail account files against Swift's reader

The Swift oracle reads the 43 account files Java read (--email-files, with
TopologyRuntimeEmailStorage.decodeJavaServer and decodeJavaClient). The
accounts the model takes match Swift's except where Swift checks names,
hosts and addresses and fails the whole file on one it rejects, or reads
the format otherwise (the first client line instead of the last, exactly
nine fields, a required messages field). Every departure is named with its
reason; Java's reading is right in each, none is a Java error Swift fixes.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-09-30 07:40:14 +00:00
co-authored by Claude Opus 5.5
parent 1efbb8a660
commit 956443726b
7 changed files with 910 additions and 2 deletions
+584
View File
@@ -0,0 +1,584 @@
[
[
"bob;filius.de;bob;Nachname;Vorname;\\u000A",
[
{
"mailbox" : [
],
"name" : "Vorname Nachname",
"password" : "bob",
"username" : "bob"
}
]
],
[
"bob;filius.de;bob;Nachname;Vorname;\\u000Aalice;filius.de;alice;A;B;\\u000A",
[
{
"mailbox" : [
],
"name" : "Vorname Nachname",
"password" : "bob",
"username" : "bob"
},
{
"mailbox" : [
],
"name" : "B A",
"password" : "alice",
"username" : "alice"
}
]
],
[
"bob;filius.de;bob;Nachname;Vorname",
"!invalidAccount(\"malformed server account\")"
],
[
"bob;;bob;Nachname;Vorname;\\u000A",
"!invalidDomain(\"\")"
],
[
"bob;filius.de;bob;Nachname\\u000A",
"!invalidAccount(\"malformed server account\")"
],
[
"bob;filius.de;bob;Nachname;Vorname;\\u000Abroken\\u000A",
"!invalidAccount(\"malformed server account\")"
],
[
" bob ;filius.de; bob ;Nachname;Vorname;\\u000A",
"!invalidAccount(\" bob \")"
],
[
"bob;filius.de;bob;Nachname;Vorname\\u000D\\u000A",
"!invalidAccount(\"malformed server account\")"
],
[
"",
[
]
],
[
"\\u000A\\u000A",
[
]
],
[
"bob;filius.de;bob;Nachname;Vorname;#Alice <alice@senior.de>$bob@filius.de$$$$Hi Bob!$Hi BoB!|\\u000A",
[
{
"mailbox" : [
{
"bcc" : [
],
"body" : "Hi BoB!\n",
"cc" : [
],
"deliveryIdentity" : null,
"from" : [
"Alice",
"alice@senior.de"
],
"id" : 1,
"isMarkedForDeletion" : false,
"isNew" : true,
"isSent" : false,
"receivedAtMilliseconds" : 1,
"subject" : "Hi Bob!",
"to" : [
[
null,
"bob@filius.de"
]
]
}
],
"name" : "Vorname Nachname",
"password" : "bob",
"username" : "bob"
}
]
],
[
"bob;filius.de;bob;Nachname;Vorname;#Alice <alice@senior.de>$bob@filius.de$$$$Hi Bob!$Hi BoB!|#Alice <alice@senior.de>$bob@filius.de$$$$Hi Bob!$Hi BoB!|\\u000A",
[
{
"mailbox" : [
{
"bcc" : [
],
"body" : "Hi BoB!\n",
"cc" : [
],
"deliveryIdentity" : null,
"from" : [
"Alice",
"alice@senior.de"
],
"id" : 1,
"isMarkedForDeletion" : false,
"isNew" : true,
"isSent" : false,
"receivedAtMilliseconds" : 1,
"subject" : "Hi Bob!",
"to" : [
[
null,
"bob@filius.de"
]
]
},
{
"bcc" : [
],
"body" : "Hi BoB!\n",
"cc" : [
],
"deliveryIdentity" : null,
"from" : [
"Alice",
"alice@senior.de"
],
"id" : 2,
"isMarkedForDeletion" : false,
"isNew" : true,
"isSent" : false,
"receivedAtMilliseconds" : 2,
"subject" : "Hi Bob!",
"to" : [
[
null,
"bob@filius.de"
]
]
}
],
"name" : "Vorname Nachname",
"password" : "bob",
"username" : "bob"
}
]
],
[
"bob;filius.de;bob;Nachname;Vorname;Alice <alice@senior.de>$bob@filius.de$$$$Hi$Text\\u000A",
[
{
"mailbox" : [
{
"bcc" : [
],
"body" : "Text",
"cc" : [
],
"deliveryIdentity" : null,
"from" : [
"Alice",
"alice@senior.de"
],
"id" : 1,
"isMarkedForDeletion" : false,
"isNew" : true,
"isSent" : false,
"receivedAtMilliseconds" : 1,
"subject" : "Hi",
"to" : [
[
null,
"bob@filius.de"
]
]
}
],
"name" : "Vorname Nachname",
"password" : "bob",
"username" : "bob"
}
]
],
[
"bob;filius.de;bob;Nachname;Vorname;#Alice <alice@senior.de>$bob@filius.de$$$$Hi$\\u000A",
[
{
"mailbox" : [
{
"bcc" : [
],
"body" : "",
"cc" : [
],
"deliveryIdentity" : null,
"from" : [
"Alice",
"alice@senior.de"
],
"id" : 1,
"isMarkedForDeletion" : false,
"isNew" : true,
"isSent" : false,
"receivedAtMilliseconds" : 1,
"subject" : "Hi",
"to" : [
[
null,
"bob@filius.de"
]
]
}
],
"name" : "Vorname Nachname",
"password" : "bob",
"username" : "bob"
}
]
],
[
"bob;filius.de;bob;Nachname;Vorname;#Alice <alice@senior.de>$bob@filius.de$$$$$\\u000A",
[
{
"mailbox" : [
{
"bcc" : [
],
"body" : "",
"cc" : [
],
"deliveryIdentity" : null,
"from" : [
"Alice",
"alice@senior.de"
],
"id" : 1,
"isMarkedForDeletion" : false,
"isNew" : true,
"isSent" : false,
"receivedAtMilliseconds" : 1,
"subject" : "",
"to" : [
[
null,
"bob@filius.de"
]
]
}
],
"name" : "Vorname Nachname",
"password" : "bob",
"username" : "bob"
}
]
],
[
"bob;filius.de;bob;Nachname;Vorname;#Alice <alice@senior.de>$bob@filius.de$$$$Hi $5$Text\\u000A",
"!malformedMessage"
],
[
"bob;filius.de;bob;Nachname;Vorname;#a@x$b@y$c@z$d@w$1234$Hi$Text\\u000A",
[
{
"mailbox" : [
{
"bcc" : [
[
null,
"d@w"
]
],
"body" : "Text",
"cc" : [
[
null,
"c@z"
]
],
"deliveryIdentity" : null,
"from" : [
null,
"a@x"
],
"id" : 1,
"isMarkedForDeletion" : false,
"isNew" : true,
"isSent" : false,
"receivedAtMilliseconds" : 1234,
"subject" : "Hi",
"to" : [
[
null,
"b@y"
]
]
}
],
"name" : "Vorname Nachname",
"password" : "bob",
"username" : "bob"
}
]
],
[
"bob;filius.de;bob;Nachname;Vorname;#a@x$b@y, ,c@z,$$$$Hi$Text\\u000A",
"!malformedMessage"
],
[
"bob;filius.de;bob;Nachname;Vorname;#Name <a@x$b@y$$$$Hi$Text\\u000A",
"!malformedMessage"
],
[
"bob;filius.de;bob;Nachname;Vorname;#<a@x>$Bob <b@y> , <c@z>$$$$Hi$Text\\u000A",
[
{
"mailbox" : [
{
"bcc" : [
],
"body" : "Text",
"cc" : [
],
"deliveryIdentity" : null,
"from" : [
null,
"a@x"
],
"id" : 1,
"isMarkedForDeletion" : false,
"isNew" : true,
"isSent" : false,
"receivedAtMilliseconds" : 1,
"subject" : "Hi",
"to" : [
[
"Bob",
"b@y"
],
[
null,
"c@z"
]
]
}
],
"name" : "Vorname Nachname",
"password" : "bob",
"username" : "bob"
}
]
],
[
"bob;filius.de;bob;Nachname;Vorname;#Only Name$b@y$$$$Hi$Text\\u000A",
"!malformedMessage"
],
[
"bob;filius.de;bob;Nachname;Vorname;#a@x$b@y$$$$Hi$l1||l2&&00124&&x&&00036&&y&&00059&&z&&00035&&w\\u000A",
[
{
"mailbox" : [
{
"bcc" : [
],
"body" : "l1\n\nl2|x$y;z#w",
"cc" : [
],
"deliveryIdentity" : null,
"from" : [
null,
"a@x"
],
"id" : 1,
"isMarkedForDeletion" : false,
"isNew" : true,
"isSent" : false,
"receivedAtMilliseconds" : 1,
"subject" : "Hi",
"to" : [
[
null,
"b@y"
]
]
}
],
"name" : "Vorname Nachname",
"password" : "bob",
"username" : "bob"
}
]
],
[
"bob;filius.de;bob;Nachname;Vorname;#a@x$b@y$$$$Hi$&&00124&&|\\u000A",
[
{
"mailbox" : [
{
"bcc" : [
],
"body" : "|\n",
"cc" : [
],
"deliveryIdentity" : null,
"from" : [
null,
"a@x"
],
"id" : 1,
"isMarkedForDeletion" : false,
"isNew" : true,
"isSent" : false,
"receivedAtMilliseconds" : 1,
"subject" : "Hi",
"to" : [
[
null,
"b@y"
]
]
}
],
"name" : "Vorname Nachname",
"password" : "bob",
"username" : "bob"
}
]
],
[
"bob;filius.de;bob;Nachname;Vorname;#a@x$b@y$$$$Hi$Text;extra\\u000A",
[
{
"mailbox" : [
{
"bcc" : [
],
"body" : "Text;extra",
"cc" : [
],
"deliveryIdentity" : null,
"from" : [
null,
"a@x"
],
"id" : 1,
"isMarkedForDeletion" : false,
"isNew" : true,
"isSent" : false,
"receivedAtMilliseconds" : 1,
"subject" : "Hi",
"to" : [
[
null,
"b@y"
]
]
}
],
"name" : "Vorname Nachname",
"password" : "bob",
"username" : "bob"
}
]
],
[
"bob;filius.de;bob;Nachname;Vorname;##a@x$b@y$$$$Hi$Text##\\u000A",
[
{
"mailbox" : [
{
"bcc" : [
],
"body" : "Text",
"cc" : [
],
"deliveryIdentity" : null,
"from" : [
null,
"a@x"
],
"id" : 1,
"isMarkedForDeletion" : false,
"isNew" : true,
"isSent" : false,
"receivedAtMilliseconds" : 1,
"subject" : "Hi",
"to" : [
[
null,
"b@y"
]
]
}
],
"name" : "Vorname Nachname",
"password" : "bob",
"username" : "bob"
}
]
],
[
"bob;filius.de;bob;Nachname;Vorname;#a@x$b@y$$$$Hi$Text\\u000D\\u000A",
[
{
"mailbox" : [
{
"bcc" : [
],
"body" : "Text",
"cc" : [
],
"deliveryIdentity" : null,
"from" : [
null,
"a@x"
],
"id" : 1,
"isMarkedForDeletion" : false,
"isNew" : true,
"isSent" : false,
"receivedAtMilliseconds" : 1,
"subject" : "Hi",
"to" : [
[
null,
"b@y"
]
]
}
],
"name" : "Vorname Nachname",
"password" : "bob",
"username" : "bob"
}
]
],
[
"bob;filius.de;bob;Nachname;Vorname;#\\u001Fa@x $b@y$$$$Hi$Text\\u000A",
"!malformedMessage"
]
]