File tree Expand file tree Collapse file tree 1 file changed +28
-3
lines changed
Expand file tree Collapse file tree 1 file changed +28
-3
lines changed Original file line number Diff line number Diff line change 66 ZBIN=$ZPFX /bin
77 export LC_CTYPE=C
88 export LANG=C
9- export ZTMP=$( mktemp -qu)
9+ export ZTMP=$( mktemp -qu) TMPQ=,
1010}
1111
12- @test ' wait-ice' {
12+ @test ' (un)load-ices' {
13+ rm -f $ZTMP
14+ # @zinit-scheduler with "burst" argument executes all tasks "now"
15+ eval zinit load' "[[ \$TMPQ = , ]]"' atload" \" !touch \$ ZTMP; TMPQ=.; TMPE=.\" " unload' "[[ \$TMPQ = . ]]"' for zdharma-continuum/null && @zinit-scheduler burst && @zinit-scheduler burst
16+ state=$?
17+ # Test if plugin effects withdrawal on unload is working
18+ assert " $TMPE " different_to .
19+ # Test if plugin is marked as unloaded
20+ assert " $ZINIT_REGISTERED_PLUGINS [-1]" different_to zdharma-continuum/null
21+ assert " $state " equals 0
22+ # Test if plugin is loaded
23+ assert " $ZTMP " is_file
24+ }
25+
26+ @test ' wait-ice-with-condition' {
27+ rm -f $ZTMP
1328 # @zinit-scheduler with "burst" argument executes all tasks "now"
14- eval zinit wait nocd atload\' touch $ZTMP \' for zdharma-continuum/null && @zinit-scheduler burst
29+ eval zinit wait' "[[ -n $ZTMP ]]"' atload' "touch $ZTMP"' for zdharma-continuum/null && @zinit-scheduler burst
30+ state=$?
1531 assert $state equals 0
1632 assert $ZTMP is_file
1733}
1834
35+ @test ' wait-ice' {
36+ rm -f $ZTMP
37+ # @zinit-scheduler with "burst" argument executes all tasks "now"
38+ eval zinit wait nocd atload' "touch $ZTMP"' for zdharma-continuum/null && @zinit-scheduler burst
39+ state=$?
40+ assert " $state " equals 0
41+ assert " $ZTMP " is_file
42+ }
43+
1944# @test 'nnn' {
2045# run zinit light-mode for jarun/nnn
2146# zinit cd jarun/nnn
You can’t perform that action at this time.
0 commit comments