Commit graph

1 commit

Author SHA1 Message Date
Vadim Peretokin
652d30fcf0
Infrastructure: add profile and map save/load round-trip tests (#9468)
#### Brief overview of PR changes/additions

Adds two functional round-trip tests.

- **ProfileRoundTripTest** builds a 31-item tree across all five object
types (with non-ASCII names and XML-hostile content), saves it via the
production `XMLexport`, reimports via `XMLimport`, and compares ~40
fields.
- **MapRoundTripTest** builds a map with rooms, areas, exits, special
exits, custom lines, userData and labels, then round-trips it at every
map format (17-20).

Both tests were proven able to fail via temporary sabotage.

#### Motivation for adding to Mudlet

Profile and map persistence had no automated coverage, so regressions in
save/load could ship unnoticed. These tests lock down the round-trip
behaviour. They immediately caught two real map-persistence bugs.

#### Other info (issues closed, discussion etc)

The two map bugs these tests caught are fixed in the stacked follow-up
PR #9469 (`fix-map-userdata-pollution` branch), which flips these tests'
`QEXPECT_FAIL` markers to hard assertions.

Tested by hand. Squash-merge with:
```
Assisted-by: Claude:claude-fable-5
Signed-off-by: Vadim Peretokin <vadim.peretokin@mudlet.org>
```
2026-07-25 17:41:15 +02:00