Backport #10646: Deduplicate path separator duplicates#10751
Closed
mergify[bot] wants to merge 4 commits into3.14from
Closed
Backport #10646: Deduplicate path separator duplicates#10751mergify[bot] wants to merge 4 commits into3.14from
mergify[bot] wants to merge 4 commits into3.14from
Conversation
- Manually replace path separators before anything else - Use pathSeparator instead of literal char - Use isPathSeparator predicate (cherry picked from commit d0bd687) # Conflicts: # cabal-install-solver/src/Distribution/Solver/Types/ProjectConfigPath.hs
- Add else.project test - Use normalizeWindowsOutput - Add a changelog entry - Update expectation - Use concatOutput on needle - Include output - Align lines - Show modified output - Apply concatOutput to the needle - Show start and end of lines with ASCII ^ and $h - Can't print pilcrow so use grep char for marking end of line - Marking the start of line distinguishes "expected" intro from its content too, same for "output" - Use \n in multiline string expectation - Add NeedleHaystack - Add expectNeedleInHaystack field to NeedleHaystack - Remove 3 assert*Contains functions - Add TxContains record - Apply the txBwd transformations before display - Add displayHaystack field - Switch to using <EOL> as the marker - Sort language pragmas - Use ++ rather than cons with reversals - Rerun ParseErrorProvenance test - Add doctests for single line strings - Read exected multiline string from file - Use lineBreaksToSpaces - Add module Test.Cabal.NeedleHaystack - Redo ConditionalAndImport with multiline expectations - Add test of string expectation start and end marking - Rename encodeLf and decodeLfMarkLines - Rename original concatOutput to lineBreaksToSpaces - Add assertOutputContainsWrapped - Use multiline and wrapped assertions - DedupUsingConfigFromComplex multiline assertion - Remove redundant tests that fail on Windows - Use normalizeWindowsOutput in ConditionalAndImport - Forward conversion applied twice by mistake - Easier diff when assertOn follows assertOutputContains - Add readVerbatimFile - Have readVerbatimFile read contents strictly - Add normalizePathSeparator - Don't modify path separator for URIs - Don't normalize path with anything URI-like - Normalize expected output - Rename to normalizePathSeparators - Add an explicit export list to NeedleHaystack - Drop unlines . lines added trailing newline - Show example of normalizePathSeparators - Use local unsnoc definition to avoid CPP - Define local unlines - Satisfy fix-whitespace - Don't use <EOL> - Rename to delimitLines - Rename the changelog with *.md extension - Add a section on cabal-testsuite changes - Rename the function to readFileVerbatim - Add to contributing and cabal-testsuite's readme - Use setup for the noun - Typo s/displaying/display - Typo "can easier" - Use unsnoc from Cabal-syntax Utils.Generic - Add a note [Multiline Needles] - Remove doctests available elsewhere - Substitute encodeLf for concatOutput for assertOutputMatches (cherry picked from commit 30f5d3f) # Conflicts: # CONTRIBUTING.md # cabal-testsuite/cabal-testsuite.cabal # cabal-testsuite/src/Test/Cabal/Prelude.hs
(cherry picked from commit 484ac9c) # Conflicts: # cabal-testsuite/PackageTests/ProjectImport/DedupUsingConfigFromComplex/cabal.out # cabal-testsuite/PackageTests/ProjectImport/DedupUsingConfigFromComplex/cabal.test.hs
- Add oops.expect.txt - Add cabal-missing-package.expect.txt - Add hops.expect.txt - Add DedupUsingConfigFromComplex/errors.expect.txt - Add using configuration from to errors.expect.txt (cherry picked from commit 32b820b)
Contributor
Author
|
Cherry-pick of d0bd687 has failed: Cherry-pick of 30f5d3f has failed: Cherry-pick of 484ac9c has failed: To fix up this pull request, you can check it out locally. See documentation: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/reviewing-changes-in-pull-requests/checking-out-pull-requests-locally |
6 tasks
Member
|
@Mergifyio refresh |
Contributor
Author
✅ Pull request refreshed |
Member
|
@Mergifyio rebase |
Contributor
Author
☑️ Nothing to doDetails
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 #10645, a small Windows gotcha missed with #10546.
I really had to get into the weeds with this one. The
assertOutputContainsfunction was modifying the output (a test actual value) before comparision with the unmodified actual value. This change was not visible. I've added anassertOnfunction (thatassertOutputContainscalls) that takes aNeedleHaystackconfiguration for how the search, expectation and display are made. I had wanted to add a pilcrow¶for line endings but the terminal output is restricted to ASCII so I've marked line beginnings with^and line endings with$. The needle (the expected output fragment) is shown annotated this way as can the haystack (the output). The haystack is not shown annotated with line delimiters but can be.The
concatOutputfunction, I've renamed tolineBreaksToSpaces. There's more detail on thecabal-testsuitechanges in the changelog entry. One benefit of using an.mdextension forchangelog.d/pr-10646.mdis that typos are caught by CI.significance: significantin the changelog file.This is an automatic backport of pull request #10646 done by [Mergify](https://mergify.com).