Add tests

This commit is contained in:
mattmc3 2025-05-10 11:58:21 -04:00
parent 6ed9275b8f
commit ed83f88722
No known key found for this signature in database
GPG Key ID: B2B915D8A8706013
1 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,39 @@
# antidote test paths with spaces
## Setup
```zsh
% TESTDATA=$PWD/tests/testdata
% source ./tests/__init__.zsh
% t_setup
% antidote-bundle -h &>/dev/null
% ANTIDOTE_HOME="$HOME/.cache/antidote with spaces"
% mkdir -p -- "$ANTIDOTE_HOME"
%
```
The bundle parser needs to properly handle quoted annotations.
```zsh
% __antidote_parser 'foo/bar' | print_aarr
$assoc_arr : bundle
_repo : foo/bar
_repodir : foo/bar
_type : repo
_url : https://github.com/foo/bar
name : foo/bar
% __antidote_parse_bundles 'foo/bar'
antidote-script foo/bar
% antidote bundle 'foo/bar'
# antidote cloning foo/bar...
fpath+=( "$HOME/.cache/antidote with spaces/foo/bar" )
source "$HOME/.cache/antidote with spaces/foo/bar/bar.plugin.zsh"
%
```
## Teardown
```zsh
% t_teardown
%
```