Add a $command variable, and colorize summary#444
Add a $command variable, and colorize summary#444msterin wants to merge 1 commit intobats-core:masterfrom
Conversation
martin-schulze-vireso
left a comment
There was a problem hiding this comment.
Thanks for this PR. Could you add tests for these new features.
|
@martin-schulze-vireso - thanks for the review ! I've just pushed the requested changes. If there is a better way of color test than to grab an escape sequences from Thanks |
7623a53 to
8ac2b7d
Compare
Fixes bats-core#163 Motivation: * See bats-core#163 for $command motivation. I second it and also it's helpful when the command passed to `run` contains multiple shell vars, so $command shows the final. * Our test pass is 400+ tests and it's super convenient to have colorized summary (pass/fail) at the end of manual runs We use bats with these fixes for long time now, time for a PR. - [x] I have reviewed the [Contributor Guidelines][contributor]. - [x] I have reviewed the [Code of Conduct][coc] and agree to abide by it [contributor]: https://github.com/bats-core/bats-core/blob/master/docs/CONTRIBUTING.md [coc]: https://github.com/bats-core/bats-core/blob/master/docs/CODE_OF_CONDUCT.md
8ac2b7d to
565f286
Compare
|
I am still mulling over whether it is okay to use @bats-core/bats-core What do you think? Should we proceed with this and place a big fat warning in the release notes? Should we use a name that is less likely to collide, like |
|
Good point and I am happy to change to whatever there is an agreement about, e.g.
Just let me know what's the maintainers' preference. |
Not directly related to this PR (sorry to pollute @msterin), but in a general way, I think that all internal variables / functions used by bats and exposed in |
|
This might become obsolete through #467 which (currently) adds |
|
@martin-schulze-vireso , they look compatible. I added the code manually to test it out and it seems to work. |
|
@msterin , you going to continue with getting this ready? If not, I'd like to take over and handle it. |
@NorseGaud Please, do take over - I just started a new job and will have very limited cycles for a while. Appreciate it. |
Best of luck with the new job! That's exciting! |
|
@martin-schulze-vireso I'm going to figure out how to do this in my existing --trace branch. You can close this PR. |
Fixes #163
Motivation:
runcontains multiple shell vars, so $command shows the final.We use bats with these fixes for a long time now, time for a PR.