Fix JSON array-based data file handling regression #4373
Merged
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.
Fixes #4361, a regression introduced in Hugo v0.35.
New test code (first commit)
The first commit includes new test code that was also submitted via #4372 against the v0.34 branch to demonstrate that the updates tests did in fact all pass for that release. They will fail in this PR, against v0.35 code, until the second commit with the fix is added.
The new tests:
Expected results are now all built manually / are more precise.
Tests can run against different versions (no linkage errs)
regression fix (second commit)
A comprehensive fix is not trivial because Hugo uses three different three unmarshalers that behave differently for the same data structures. In the interests of fixing the regression ASAP, this PR will only address the regression.