Skip to content

Commit

Permalink
Merge pull request #597 from gioele/warning-add-shebang
Browse files Browse the repository at this point in the history
warnings.bash: Add shebang
  • Loading branch information
martin-schulze-vireso committed May 21, 2022
2 parents c0c4eac + 6498b39 commit 7247017
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 2 additions & 0 deletions docs/CHANGELOG.md
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
@@ -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
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)" ]
}

0 comments on commit 7247017

Please sign in to comment.