From e3f856f3bb50bdb9ec7ab6734f7ba9753d7197fb Mon Sep 17 00:00:00 2001 From: Sebastian Gniazdowski Date: Tue, 20 Dec 2022 16:08:43 +0059 Subject: [PATCH] Test the special wait'' syntax using a eval snippet, like e.g.: wait'[[ -n $var ]]'. --- tests/plugins.zunit | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/plugins.zunit b/tests/plugins.zunit index 626340385..c423047d1 100755 --- a/tests/plugins.zunit +++ b/tests/plugins.zunit @@ -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