dev tools: Extend tests/generate.zsh.

This commit is contained in:
Daniel Shahaf
2016-07-29 19:02:40 +00:00
parent 8013dc3b8d
commit add6825898
2 changed files with 11 additions and 11 deletions

View File

@@ -45,17 +45,13 @@ Writing new tests
An experimental tool is available to generate test files:
zsh -f tests/generate.zsh 'ls -x' \
| sed s/YYYY/$(date +%Y)/ \
> highlighters/main/test-data/foo.zsh
git add -N $_
zsh -f tests/generate.zsh 'ls -x' acme newfile
This generates a test file based on the current highlighting of the given `$BUFFER`
(in this case, `ls -x`).
This generates a `highlighters/acme/test-data/newfile.zsh` test file based on
the current highlighting of the given `$BUFFER` (in this case, `ls -x`).
_This tool is experimental._ Its interface may change. In particular it may
grow ways to set `$PREBUFFER` and/or `$ZSH_HIGHLIGHT_HIGHLIGHTERS` or to
inject free-form code into the generated file.
grow ways to set `$PREBUFFER` to inject free-form code into the generated file.
Highlighting test