dots2/.antidote/tests/test_zcompile_static.md

1.1 KiB

antidote load tests

Setup

% source ./tests/_setup.zsh
% source ./antidote.zsh
%

General

Ensure a compiled file exists:

% zstyle ':antidote:static' zcompile 'yes'
% zstyle ':antidote:static' file $ZDOTDIR/.zplugins_fake_zcompile_static.zsh
% ! test -e $ZDOTDIR/.zplugins_fake_zcompile_static.zsh.zwc  #=> --exit 0
% antidote load $ZDOTDIR/.zplugins_fake_load >/dev/null
% cat $ZDOTDIR/.zplugins_fake_zcompile_static.zsh | subenv  #=> --file testdata/.zplugins_fake_zcompile_static.zsh
% test -e $ZDOTDIR/.zplugins_fake_zcompile_static.zsh.zwc  #=> --exit 0
% t_reset
%

Ensure a compiled file does not exist:

% zstyle ':antidote:static' zcompile 'no'
% zstyle ':antidote:static' file $ZDOTDIR/.zplugins_fake_load.zsh
% ! test -e $ZDOTDIR/.zplugins_fake_load.zsh.zwc  #=> --exit 0
% antidote load $ZDOTDIR/.zplugins_fake_load >/dev/null
% cat $ZDOTDIR/.zplugins_fake_load.zsh | subenv  #=> --file testdata/.zplugins_fake_load.zsh
% ! test -e $ZDOTDIR/.zplugins_fake_load.zsh.zwc  #=> --exit 0
% t_reset
%

Teardown

% t_teardown
%