Skip to content

Move to the paged document support in Verify 33.3 - #905

Merged
SimonCropp merged 1 commit into
mainfrom
paged-documents
Oct 5, 2026
Merged

SimonCropp merged 1 commit into
mainfrom
paged-documents

Conversation

@SimonCropp

Copy link
Copy Markdown
Member

Moves Verify.ImageMagick onto the source and derived targets that Verify 33.3 added for paged documents (Verify#1951), and takes the package from 3.11.0 to 4.0.0.

The converter now says which of its targets is the document and which were computed from it. Verify compares the document first, so a file derived from it is only given the benefit of its comparer while the document itself is unchanged, and DiffEngine's viewer shows the files derived from a document beneath it and accepts them with it.

It is a major version because what an existing test suite has to change is listed below. Verify and its adapter are pinned at 33.3.0.

Migrating from 3.x

Version 4 moves to the paged document support in Verify 33.3. The options of this plugin that chose what was verified are now settings of Verify:

3.x 4.x
Initialize(ImageMagickOutputs.None) Initialize() and VerifierSettings.ExcludeDerivedTargets("png")
Initialize(ImageMagickOutputs.Png) or Initialize(ImageMagickOutputs.All) Initialize()
.PagesToInclude(2), an extension method of this plugin .PagesToInclude(2), a member of Verify's SettingsTask and VerifySettings

A call to PagesToInclude compiles unchanged. It can now also take a delegate, and both it and ExcludeDerivedTargets can be set for one verification or, on VerifierSettings, for all of them.

The page of a pdf is named by its number, which is 1 based. It was named by an index, which was 0 based and missing for a pdf with one page. A pdf also has an info file now, holding its page count:

3.x 4.x
Tests.Report#00.verified.png Tests.Report#page_0001.verified.png
Tests.Report#01.verified.png Tests.Report#page_0002.verified.png
Tests.Report.verified.png, of a pdf with one page Tests.Report#page_0001.verified.png
Tests.Mail#Attachment.00.verified.png, of a pdf that is a target named Attachment Tests.Mail#Attachment.page_0001.verified.png
Tests.Report.verified.txt, the info file

The .verified.pdf is unchanged, and so are the .verified.svg and .verified.png of an svg.

Renamed snapshots show as a new file and a pending delete. Accepting both, or running once with AutoVerify, moves a test over. A page draws as it did, but ImageMagick writes the time into every png it renders, so an accepted page differs from the file it replaces by those bytes, and source control shows a rename with a small change.

Testing

Built in Release and run with the commands CI uses, against Verify 33.3.0 from nuget.org: 20 passed.

@SimonCropp SimonCropp added this to the 4.0.0 milestone Oct 5, 2026
@SimonCropp
SimonCropp merged commit b7244e2 into main Oct 5, 2026
6 checks passed
@SimonCropp
SimonCropp deleted the paged-documents branch October 5, 2026 10:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

1 participant