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

warnings.bash: Add shebang #597

Merged
merged 4 commits into from
May 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 2 additions & 0 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ The format is based on [Keep a Changelog][kac] and this project adheres to

### Fixed

* added missing shebang (#597)

#### Documentation

* typos (#596)
Expand Down
4 changes: 3 additions & 1 deletion lib/bats-core/warnings.bash
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
#!/usr/bin/env bash

# shellcheck source=lib/bats-core/tracing.bash
source "$BATS_ROOT/lib/bats-core/tracing.bash"

Expand Down Expand Up @@ -30,4 +32,4 @@ bats_warn_minimum_guaranteed_version() { # <feature> <minimum required version>
if bats_version_lt "$BATS_GUARANTEED_MINIMUM_VERSION" "$2"; then
bats_generate_warning 2 "$1" "$2" "$2"
fi
}
}
7 changes: 0 additions & 7 deletions test.bats

This file was deleted.

2 changes: 1 addition & 1 deletion test/warnings.bats
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ setup() {
[ "${lines[1]}" == "ok 1 Trigger BW02" ]
[ "${lines[2]}" == "The following warnings were encountered during tests:" ]
[ "${lines[3]}" == "BW02: Using flags on \`run\` requires at least BATS_VERSION=1.5.0. Use \`bats_require_minimum_version 1.5.0\` to fix this message." ]
[[ "${lines[4]}" == " (from function \`bats_warn_minimum_guaranteed_version' in file ${RELATIVE_BATS_ROOT}lib/bats-core/warnings.bash, line 31,"* ]]
[[ "${lines[4]}" == " (from function \`bats_warn_minimum_guaranteed_version' in file ${RELATIVE_BATS_ROOT}lib/bats-core/warnings.bash, line 33,"* ]]
[[ "${lines[5]}" == " from function \`run' in file ${RELATIVE_BATS_ROOT}lib/bats-core/test_functions.bash, line"* ]]
[ "${lines[6]}" == " in test file $RELATIVE_FIXTURE_ROOT/BW02.bats, line 2)" ]
}