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

Transfer bats#142 - This commit corrects the problem of incorrect TAP format for skipped tests #19

Merged
merged 4 commits into from
Oct 3, 2017

Conversation

agent-0028
Copy link
Contributor

@agent-0028 agent-0028 commented Oct 2, 2017

todo

  • validate the skip reason is included in the formatted "spec" output

This transfers sstephenson/bats#142 to bats-core and makes "skipped" test output compliant to TAP spec

Tim Harsch and others added 3 commits January 20, 2016 17:14
Separate "skip" from the test name (description) to be distinct from "skip" as part of the TAP Directive.
@mbland mbland self-requested a review October 2, 2017 21:01
This was referenced Oct 2, 2017
Copy link
Contributor

@mbland mbland left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good but for the one comment regarding the unquoted $FIXTURE_ROOT paths.

test/bats.bats Outdated
}

@test "tap passing and skipping tests" {
run filter_control_sequences bats --tap $FIXTURE_ROOT/passing_and_skipping.bats
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add double quotes around the $FIXTURE_ROOT/passing_and-skipping.bats path here and on line 77. Otherwise a $FIXTURE_ROOT with spaces in it will break the test. See ebb192e from #8.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@agent-0028 You good to make this change?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed. I'll take care of it.

@mbland mbland merged commit 6ce148b into bats-core:master Oct 3, 2017
@btamayo btamayo added this to the v0.5.0 milestone Nov 8, 2017
mbland added a commit to mbland/go-script-bash that referenced this pull request Jun 10, 2018
https://github.com/bats-core/bats-core/releases/tag/v1.0.0, while
honoring the same interface as v0.4.0, introduced a few changes that
required some cleanup of our Bats utilities:

- bin/bats is no longer a symlink to libexec/bats, and the latter can no
  longer be invoked directly; hence _GO_BATS_PATH is now set to
  bin/bats.

- TAP output for skipped tests changed in bats-core/bats-core#19.

- run_bats_test_suite_in_isolation depended upon _GO_ROOTDIR and
  _GO_BATS_PATH, which led to bats not being able to find its libexec
  scripts. The bats path is now computed using `command -v bats`, which
  makes the library itself more portable.

- Some assertion-test-helpers output didn't end with a newline. This
  prevented the `while` loop used to replace `sed` in
  bats-core/bats-core#88 from reading the final line of output from the
  test. While this was fixed in bats-core/bats-core#99, updating the
  code to always emit newlines was still the right thing to do.

There was a bug in Bats v1.0.0 in setting `BATS_CWD` that broke the
"assertion-test-helpers: failing assertion must disable shell options"
test case. Specifically, stack trace paths that should've looked like:

  tests/assertion-test-helpers.bash

instead looked like:

  go-script-bash/tests/assertion-test-helpers.bash

This was fixed by bats-core/bats-core#98.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants