1.1 KiB
1.1 KiB
antidote installs tests
Setup
% source ./tests/_setup.zsh
% source ./antidote.zsh
%
Install Command
antidote install requires a <bundle> argument.
% antidote install #=> --exit 1
antidote: error: required argument 'bundle' not provided, try --help
%
Trying to install an existing bundle fails.
% antidote install foo/bar &>/dev/null #=> --exit 1
% antidote install foo/bar 2>&1 | subenv ANTIDOTE_HOME >&2
antidote: error: foo/bar already installed: $ANTIDOTE_HOME/foo/bar
%
Install a bundle
% antidote install rupa/z | subenv ZDOTDIR
# antidote cloning rupa/z...
Adding bundle to '$ZDOTDIR/.zsh_plugins.txt':
rupa/z
% tail -n 1 $ZDOTDIR/.zsh_plugins.txt
rupa/z
%
Install a complicated bundle
% antidote install --path plugins/macos --conditional is-macos ohmyzsh/ohmyzsh | subenv ZDOTDIR
# antidote cloning ohmyzsh/ohmyzsh...
Adding bundle to '$ZDOTDIR/.zsh_plugins.txt':
ohmyzsh/ohmyzsh path:plugins/macos conditional:is-macos
% tail -n 1 $ZDOTDIR/.zsh_plugins.txt
ohmyzsh/ohmyzsh path:plugins/macos conditional:is-macos
%
Teardown
% t_teardown
%