Skip to content
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

Need ncurses for pretty printing to work #239

Merged
merged 1 commit into from
Apr 27, 2020
Merged

Conversation

dlorch
Copy link
Contributor

@dlorch dlorch commented Aug 4, 2019

As the title says. Without ncurses, the output defaults to "TAP", even on an interactive console:

$ docker run -it bats/bats:latest /opt/bats/test
1..78
ok 1 no arguments prints message and usage instructions
ok 2 invalid option prints message and usage instructions
ok 3 -v and --version print version number
ok 4 -h and --help print help
ok 5 invalid filename prints an error
ok 6 empty test file runs zero tests
ok 7 one passing test
ok 8 summary passing tests
...

with ncurses:

$ docker run -it bats/bats:latest /opt/bats/test
 ✓ no arguments prints message and usage instructions
 ✓ invalid option prints message and usage instructions
 ✓ -v and --version print version number
 ✓ -h and --help print help
 ✓ invalid filename prints an error
 ✓ empty test file runs zero tests
 ✓ one passing test
 ✓ summary passing tests
...

Note that -p and --pretty do not work without ncurses.

I don't know if ncurses is actually needed or not, but bats checks for it here:

command -v tput

@dlorch dlorch requested a review from a team as a code owner August 4, 2019 08:00
Dockerfile Outdated Show resolved Hide resolved
@sublimino
Copy link
Member

Thanks for the contribution @dlorch! 👍

@sublimino
Copy link
Member

sublimino commented Apr 27, 2020

It occurs to me now this is merged that this is redefining accidental behaviour that CI suites may have been relying on: implicit default in Docker was --tap, it's now --pretty

The fix is to do as in .travis.yml and manually specify the formatter (--tap or --formatter tap):

docker run -it "bats/bats:bash-${BASHVER}" --tap /opt/bats/test

If this will cause anybody problems please LMK here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants