(#1174)(#1610) Add tests for package versions with leading zeros #2970
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description Of Changes
This adds pack tests to ensure that leading zeros are removed, and that a zero in the fourth part of the version will be trimmed down to three parts.
More scenarios are added to ensure that pre-existing packages with non-normalized versions can be installed/upgrade/uninstalled, and that they can be found when searching with a version.
Motivation and Context
As a part of supporting SemVer v2, some version normalization was added.
https://learn.microsoft.com/en-us/nuget/concepts/package-versioning#normalized-version-numbers
The pack tests are to ensure that the version normalization on pack with the new NuGet assemblies is consistent into the future. There were already pack tests for removing semver v2 build metadata and that four part versions still work.
The other tests make sure that pre-existing non-normalized versions of packages still install/upgrade/uninstall correctly, and that when specifying a version they can be found.
Testing
Operating Systems Testing
Change Types Made
Change Checklist
Related Issue
Tests for #1174
Part of #1610
https://app.clickup.com/t/20540031/PROJ-381