Report deletes as directory relative paths

Merged
SI
3mo ago
+48-3

The Delete: section emitted Path.GetFileName(file), while New:, NotEqual: and Equal: all emit a path relative to the reported directory, and Verify.ExceptionParsing rebuilds each delete entry with Path.Combine(directory, name).

For flat layouts the two agree, so this only shows up where snapshots live in a subdirectory — UseUniqueDirectory() and VerifyDirectory. A stale {Directory}\Type.Method\old.verified.txt was reported as just old.verified.txt and parsed back as {Directory}\old.verified.txt, which does not exist. Same-named files in different subdirectories also collapsed onto one entry.

The section now uses IoHelpers.GetRelativePath, the same call the other sections use, so the round trip holds.

Also documents the invariant in exception-message-format.md: the file listing paths are relative to the reported directory and keep any subdirectory. The doc previously only said the inline paths are absolute, leaving the file sections implicit.

Two tests, one per side of the round trip: VerifyExceptionMessageBuilderTests.DeleteInSubDirectory for what is emitted, and ExceptionParsingTests.DeleteInSubDirectory for what comes back. On main both produce old.verified.txt / {ProjectDirectory}old.verified.txt.

Verify.ExceptionParsing.Tests (84 across net11.0 and net48), Verify.Tests (1299) and StaticSettingsTests pass. No existing snapshot changed — the other Delete: snapshots all use flat paths.