-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Add regression testing for the custom assets functionality #1829
Conversation
The test is following the same steps regular users are instructed to follow: https://github.com/sharkdp/bat/blob/master/README.md#adding-new-syntaxes--language-definitions
Thanks to both of you for taking a look! This PR is now ready for detailed code review. |
All comments taken care of. Looking forward to another review round. |
Thank you for the update and the extra test. If we want developers to run this script locally in their 'dirty' environment, there are some more things that need to be taken care of. We should probably pass bat/tests/integration_tests.rs Lines 34 to 51 in 9602195
and bat/tests/syntax-tests/create_highlighted_versions.py Lines 11 to 17 in 9602195
bat/tests/syntax-tests/create_highlighted_versions.py Lines 48 to 56 in 9602195
|
Hmm. Not sure I agree it is a good idea to spend time on making the script run in any thinkable environment. There is a difference between "being able to run the script locally" and "making sure the script works, no matter in what environment it is run". There are many facets to my opinion.
So why did I think it was a good idea to make use of e.g.
Admittedly, my opinion might be a bit tainted by my focus on #951. Spending more time on this script would to me be a distraction from #951 rather than help us get #951 fixed quicker. At this point, I just want to get this PR merged, so that I can merge #1825, so that I can update #1787. |
Hm, yes. But as long as we don't provide a clean docker environment for testing out of the box, it's rather inconvenient for developers to modify their local environment to make it "CI-like". It's not unreasonable to have a I didn't add all of this clean up code just because I was thinking of hypothetical scenarios. I added it because tests were locally failing in some environments. That being said, for this particular script, I don't think we need more clean-up work. And if we missed something, we can also add it in later. It is possible to break the tests (e.g. by setting
Partially agreed. I have spent time in the past figuring out why I couldn't reproduce a bug report. Or a test failure. Time that I could have saved by proactively making sure that the environment is clean/comparable. For testing, it would be ideal to have a completely side-effect-free program. Somewhat unfortunately, Again - not speaking of this PR here, but more generally.
That's completely fair. I don't want to slow you down. This PR is a great addition for our tests. |
Thanks for being pragmatic despite making valid counter-points 👍 Merging. |
Our current CI pipeline does not regression test the custom assets functionality at all. We get a green pipeline even if we replace
HighlitingAssets::from_cache
with this:This PR adds code to regression test the custom assets functionality. It can be seen as preparatory work for the verification of #1825, but is of course useful on its own.