Files
fpc-msgbase/tests
Ken Johnson d7e58932e9 Phase 4: kludge round-trip + cross-format capability tests
Adds tests/test_roundtrip_attrs.pas covering:

1. Capabilities API smoke test — confirms SupportsAttribute('msgid')
   returns true on JAM/Squish/MSG/PKT, false on Hudson/GoldBase/
   EzyCom/Wildcat/PCBoard. Confirms backend-private keys are gated
   correctly (Squish.SupportsAttribute('jam.msgidcrc') = false).

2. Per-format kludge round-trip across all 5 storage formats —
   builds a synthetic message with universal headers + FTSC kludges
   (msgid, replyid, pid, flags, multi-line seen-by + path), writes,
   reopens, reads back, asserts every key the backend's capability
   list advertises survives byte-for-byte. Backends that don't
   support a given key are silently skipped via SupportsAttribute
   gating so the test exercises each format's actual contract.

3. Cross-format JAM → Squish copy — seeds JAM with the kludge
   message, copies to a fresh Squish base via the unified API,
   reopens both, asserts:
   - intersection of capabilities lists is preserved verbatim
     (msgid, seen-by, path, etc. all survive JAM → Squish)
   - jam.* keys not in Squish's capability list are dropped
     (no silent corruption of Squish's data with foreign keys)

Result: 7/7 new tests pass. Total suite now 31/31 across 8 programs.
This is the regression suite that locks the Body+Attributes contract
and proves the showstopper fix holds across every backend.

Hooked into run_tests.sh so CI catches future drift.
2026-04-17 14:32:38 -07:00
..