Implement assert matches with assert on#10735
Merged
Merged
Conversation
7848a0c to
9b7ecbd
Compare
5e476e8 to
ff435b7
Compare
9999years
approved these changes
Jan 13, 2025
Collaborator
9999years
left a comment
There was a problem hiding this comment.
I think this is good. Longer-term, I want better exception-throwing infrastructure that makes it possible to use the normal expect-test and output-marker machinery for these tests.
Collaborator
Author
Thanks for the approval @9999years. Could you please link to or describe what you mean by the above? |
Collaborator
|
@philderbeast I'll put some more details here soon, but here's the general idea: |
ff435b7 to
9761855
Compare
9f19760 to
bfcac48
Compare
bfcac48 to
e85edd8
Compare
geekosaur
approved these changes
Apr 10, 2025
e85edd8 to
45af92c
Compare
Member
|
@philderbeast: could you please restart CI and set the merge label? thank you for the PR! |
45af92c to
58bd2ac
Compare
- Add NeedleHaystackCompare - Add tests of assertions - Quote regex pattern - Add regex tests - Add assertOutputMatches tests - Add tests using POSIX character classes - Rename to TxFwdBwd - Add isInfixOf predicate to assertOn calls
58bd2ac to
b2d1fcc
Compare
Collaborator
Author
|
Label merge+no rebase is necessary when the pull request is from an organisation. |
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.
A follow on from #10646 that I had to rebase this on top of changes from #10647 that added
assertOutputMatchesandassertOutputDoesNotMatchtocabal-testsuite/src/Test/Cabal/Prelude.hs. At that time I made this small change but saw thatassertOutputMatchesandassertOutputDoesNotMatchcould be implemented withassertOn. That what this pull request does.Template B: This PR does not modify behaviour or interface
QA Notes
I've moved tests to
cabal-testsuite/AssertTests/cabal.test.hsthat are only flexing theassert*functions and are not truly package tests. These tests pass but you'll want to see them fail too to see that the output is as expected. To do that you'll need to make a change and rerun the test: