Skip to content

Commit e3f856f

Browse files
committed
Test the special wait'' syntax using a eval snippet, like e.g.: wait'[[ -n $var ]]'.
1 parent 1bb2d6c commit e3f856f

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

tests/plugins.zunit

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,16 @@
99
export ZTMP=$(mktemp -qu)
1010
}
1111

12+
@test 'wait-ice-brackets' {
13+
rm -f $ZTMP
14+
# @zinit-scheduler with "burst" argument executes all tasks "now"
15+
eval zinit wait"\"[[ -n $ZTMP ]]\"" nocd atload\'touch $ZTMP\' for zdharma-continuum/null && @zinit-scheduler burst
16+
assert $state equals 0
17+
assert $ZTMP is_file
18+
}
19+
1220
@test 'wait-ice' {
21+
rm -f $ZTMP
1322
# @zinit-scheduler with "burst" argument executes all tasks "now"
1423
eval zinit wait nocd atload\'touch $ZTMP\' for zdharma-continuum/null && @zinit-scheduler burst
1524
assert $state equals 0

0 commit comments

Comments
 (0)