Skip to content

Commit 23acc98

Browse files
committed
test: Set ignore pattern from bats/* to bats
Minor tweak after dealing with the Bash 4.4 `GLOBIGNORE` issue in the previous commit.
1 parent ad2fd70 commit 23acc98

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

scripts/test

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
# you may need to include it in quotes so it isn't expanded by the shell
2121
# _before_ executing the {{cmd}} command.
2222

23-
declare -r __GO_TEST_GLOB_ARGS=('--ignore' 'bats/*' 'tests' '.bats')
23+
declare -r __GO_TEST_GLOB_ARGS=('--ignore' 'bats' 'tests' '.bats')
2424

2525
_test_tab_completion() {
2626
local word_index="$1"

tests/test.bats

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ teardown() {
2020
@test "$SUITE: tab complete flags, first-level tests and directories" {
2121
local expected=('--coverage' '--edit' '--list')
2222
expected+=($('./go' 'glob' '--complete' '5' \
23-
'--trim' '--ignore' 'bats/*' 'tests' '.bats'))
23+
'--trim' '--ignore' 'bats' 'tests' '.bats'))
2424
[[ "${#expected[@]}" -ne 1 ]]
2525

2626
run ./go test --complete 0 ''
@@ -51,7 +51,7 @@ _trim_expected() {
5151

5252
@test "$SUITE: no arguments after --list lists all tests" {
5353
local expected=(
54-
$('./go' 'glob' '--trim' '--ignore' 'bats/*' 'tests' '.bats'))
54+
$('./go' 'glob' '--trim' '--ignore' 'bats' 'tests' '.bats'))
5555
[[ "${#expected[@]}" -ne 0 ]]
5656

5757
run ./go test --list

0 commit comments

Comments
 (0)