Skip to content

Commit

Permalink
test: check for unwanted completions files
Browse files Browse the repository at this point in the history
  • Loading branch information
pschmitt committed Jun 4, 2023
1 parent 11df5c9 commit 67c30ec
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/ices.zunit
Original file line number Diff line number Diff line change
Expand Up @@ -51,5 +51,15 @@
assert "$ZPLUGINS/test---completions-overwrite/_whatever2" is_file
assert "$ZINIT[COMPLETIONS_DIR]/_whatever2" is_file
}
@test 'completions-ignored' {
# only the _valid file should be installed as a completion
run zinit as"null" id-as"test/ignored_completions" atclone"touch __init__.py _valid" completions for zdharma-continuum/null
assert $state equals 0
assert "$ZPLUGINS/test---ignored_completions/_valid" is_file
assert "$ZPLUGINS/test---ignored_completions/__init__.py" is_file
assert "$ZINIT[COMPLETIONS_DIR]/_valid" is_file
COMPS=( "$ZINIT[COMPLETIONS_DIR]"/_* )
assert __init__.py is_not_value_in $COMPS
}

# vim:ft=zsh:sw=2:sts=2:et:foldmarker=\ {,}:foldmethod=marker

0 comments on commit 67c30ec

Please sign in to comment.