It appears that changing the value true
to false
does not make the tests to run. However, commenting the lines below make the tests to run. Is that expected?
#[[ $BATS_RUN_SKIPPED == "true" ]] || skip
It appears that changing the value true
to false
does not make the tests to run. However, commenting the lines below make the tests to run. Is that expected?
#[[ $BATS_RUN_SKIPPED == "true" ]] || skip
Try doing export BATS_RUN_SKIPPED=true
before running bats
When all the lines #[[ $BATS_RUN_SKIPPED == "true" ]] || skip
remain commented, all the tests ran regardless of the value of the exported variable. I even gave them bogus values like trueeee
and falseeee
and they all run all the same.
user@debian:~/programming/exercism.org/bash/bob$ export BATS_RUN_SKIPPED=true
user@debian:~/programming/exercism.org/bash/bob$ bats bob.bats
bob.bats
✓ stating something
✓ shouting
✓ shouting gibberish
✓ asking a question
✓ asking a numeric question
✓ asking gibberish
✓ talking forcefully
✓ using acronyms in regular speech
✓ forceful question
✓ shouting numbers
✓ no letters
✓ question with no letters
✓ shouting with special characters
✓ shouting with no exclamation mark
✓ statement containing question mark
✓ non-letters with question
✓ prattling on
✓ silence
✓ prolonged silence
✓ alternate silence
✓ multiple line question
✓ starting with whitespace
✓ ending with whitespace
✓ other whitespace
✓ non-question ending with whitespace
✓ no input is silence
✓ yelling a filename expansion
✓ asking a filename expansion
28 tests, 0 failures
user@debian:~/programming/exercism.org/bash/bob$ export BATS_RUN_SKIPPED=false
user@debian:~/programming/exercism.org/bash/bob$ bats bob.bats
bob.bats
✓ stating something
✓ shouting
✓ shouting gibberish
✓ asking a question
✓ asking a numeric question
✓ asking gibberish
✓ talking forcefully
✓ using acronyms in regular speech
✓ forceful question
✓ shouting numbers
✓ no letters
✓ question with no letters
✓ shouting with special characters
✓ shouting with no exclamation mark
✓ statement containing question mark
✓ non-letters with question
✓ prattling on
✓ silence
✓ prolonged silence
✓ alternate silence
✓ multiple line question
✓ starting with whitespace
✓ ending with whitespace
✓ other whitespace
✓ non-question ending with whitespace
✓ no input is silence
✓ yelling a filename expansion
✓ asking a filename expansion
28 tests, 0 failures
Yup. Commenting out the skip
lines does mean test skipping won’t happen. But you shouldn’t need to edit the test files.