-
Notifications
You must be signed in to change notification settings - Fork 710
Implement assert matches with assert on #10735
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
7848a0c
to
9b7ecbd
Compare
5e476e8
to
ff435b7
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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.
Thanks for the approval @9999years. Could you please link to or describe what you mean by the above? |
@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
e85edd8
to
45af92c
Compare
@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
Label merge+no rebase is necessary when the pull request is from an organisation. |
A follow on from #10646 that I had to rebase this on top of changes from #10647 that added
assertOutputMatches
andassertOutputDoesNotMatch
tocabal-testsuite/src/Test/Cabal/Prelude.hs
. At that time I made this small change but saw thatassertOutputMatches
andassertOutputDoesNotMatch
could 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.hs
that 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: