Skip to content

Commit

Permalink
test: Set ignore pattern from bats/* to bats
Browse files Browse the repository at this point in the history
Minor tweak after dealing with the Bash 4.4 `GLOBIGNORE` issue in the
previous commit.
  • Loading branch information
mbland committed Sep 16, 2016
1 parent ad2fd70 commit 23acc98
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion scripts/test
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
# you may need to include it in quotes so it isn't expanded by the shell
# _before_ executing the {{cmd}} command.

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

_test_tab_completion() {
local word_index="$1"
Expand Down
4 changes: 2 additions & 2 deletions tests/test.bats
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ teardown() {
@test "$SUITE: tab complete flags, first-level tests and directories" {
local expected=('--coverage' '--edit' '--list')
expected+=($('./go' 'glob' '--complete' '5' \
'--trim' '--ignore' 'bats/*' 'tests' '.bats'))
'--trim' '--ignore' 'bats' 'tests' '.bats'))
[[ "${#expected[@]}" -ne 1 ]]

run ./go test --complete 0 ''
Expand Down Expand Up @@ -51,7 +51,7 @@ _trim_expected() {

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

run ./go test --list
Expand Down

0 comments on commit 23acc98

Please sign in to comment.