Commit Graph

7 Commits

Author SHA1 Message Date
99a36f71d0 Add vCard 4 LANG and TZ value-type tests 2026-03-28 20:27:12 -05:00
2ae016f426 Failing tests for vCard v4 fix sets. 2026-03-28 19:54:17 -05:00
e3f0fdc1ab Refactor vCard validation and canonicalize VERSION handling
Move whole-card cardinality checks into overloaded validate helpers in
the vCard 3 and vCard 4 modules, and have readVCard invoke those
validators after parsing instead of hard-coding property checks in the
shared parser.

For vCard 3, validate property cardinality directly from propertyCardMap
and add regression coverage for duplicate single-cardinality properties.
For vCard 4, validate from propertyCardMap as well, while preserving
ALTID semantics for single-cardinality properties so alternate
representations remain valid and duplicate ungrouped properties are
rejected.

Rework VERSION handling to treat it as parser metadata rather than
stored card content. Parsing still requires exactly one canonical
VERSION line and rejects missing or duplicate occurrences, but parsed
cards no longer retain VC3_Version or VC4_Version objects in content.
Accessors and serializers continue to expose and emit the canonical
version for the concrete card type, which keeps parsed and
programmatically constructed cards on the same model.

Update the vCard 3 and vCard 4 test suites to cover the new validation
path, confirm VERSION is not persisted in content, and adjust fixture
expectations to match the canonical VERSION model.

AI-Assisted: yes
AI-Tool: OpenAI Codex / gpt-5.4 xhigh
2026-03-28 19:41:09 -05:00
c9de20f3a7 WIP: Test cases covering findings surfaced by ChatGPT. 2026-03-28 09:58:12 -05:00
ab2579bdb5 Modifications to compile under Nim 2.x 2026-03-28 09:55:17 -05:00
98c300fee2 vcard4: Complete implementation.
- Parsers and serializers are now present for all property types.
- Tests exist to cover parsing for most value types. Many property types
  share the same parsing logic based on their value type. We have
  created unit tests to cover each value type, not neccesarily all
  properties individually.
2023-05-02 22:37:23 -05:00
f59403ad72 WIP - initial VCard4 implementation. 2023-04-23 21:56:15 -05:00