Skip to content

Commit

Permalink
Test the special wait'' syntax using a eval snippet, like e.g.: wait'…
Browse files Browse the repository at this point in the history
…[[ -n $var ]]'.
  • Loading branch information
psprint committed Dec 20, 2022
1 parent 1bb2d6c commit e3f856f
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/plugins.zunit
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,16 @@
export ZTMP=$(mktemp -qu)
}

@test 'wait-ice-brackets' {
rm -f $ZTMP
# @zinit-scheduler with "burst" argument executes all tasks "now"
eval zinit wait"\"[[ -n $ZTMP ]]\"" nocd atload\'touch $ZTMP\' for zdharma-continuum/null && @zinit-scheduler burst
assert $state equals 0
assert $ZTMP is_file
}

@test 'wait-ice' {
rm -f $ZTMP
# @zinit-scheduler with "burst" argument executes all tasks "now"
eval zinit wait nocd atload\'touch $ZTMP\' for zdharma-continuum/null && @zinit-scheduler burst
assert $state equals 0
Expand Down

0 comments on commit e3f856f

Please sign in to comment.