WIP: Test cases covering findings surfaced by ChatGPT.

This commit is contained in:
2026-03-28 09:58:12 -05:00
parent ab2579bdb5
commit c9de20f3a7
2 changed files with 155 additions and 2 deletions

View File

@@ -68,8 +68,14 @@ suite "vcard/vcard4":
types = @["work", "internet"],
params = @[("PREF", @["1"]), ("X-ATTACHMENT-LIMIT", @["25MB"])])
check serialize(email) ==
"EMAIL;X-ATTACHMENT-LIMIT=25MB;TYPE=work,internet;PREF=1:john.smith@testco.test"
let serialized = serialize(email)
check:
serialized.startsWith("EMAIL;")
serialized.endsWith(":john.smith@testco.test")
serialized.contains(";PREF=1")
serialized.contains(";TYPE=work,internet")
serialized.contains(";X-ATTACHMENT-LIMIT=25MB")
serialized.count(';') == 3
test "can parse properties with escaped characters":
check v4Ex.note.len == 1