Matthew Martin
a9be0975c8
tests: Directly diff expected_region_highlight against region_highlight
hace 6 años
Matthew Martin
7b417be1ce
tests: Escape newlines in TAP description
hace 6 años
Daniel Shahaf
c969a1f26a
tests: Include the filename in error messages.
The new failure mode is:
.
Running test main
Bail out! On './highlighters/main/test-data/glob.zsh': Either 'PREBUFFER' or 'BUFFER' must be declared and non-blank
Bail out! On './highlighters/main/test-data/glob.zsh': output on stderr
Running test pattern
Fixes #478 .
hace 6 años
Daniel Shahaf
8652a8f4e4
Bump copyright years.
hace 6 años
Matthew Martin
f4d37b74cc
tests: Add ability to skip tests
hace 6 años
Matthew Martin
4bd30737dc
tests: Support SKIP directive in tap-colorizer
hace 6 años
Matthew Martin
038409c10d
tests: Run tests with WARN_CREATE_GLOBAL
hace 6 años
Matthew Martin
c948a3caa0
tests: Declare local variables
hace 6 años
Matthew Martin
18517cc98e
tests: Run tests with NOUNSET
hace 6 años
Matthew Martin
459c128f43
tests: Set ZLE variables to sane defaults
hace 6 años
Matthew Martin
079ea39f74
tests: Ensure region highlight is unset if NONE is expected
hace 6 años
Matthew Martin
a9ce931439
Default possibly unset variables to empty
hace 6 años
Matthew Martin
a33c72e838
tests: Use idiomatic set check
hace 6 años
Daniel Shahaf
5efd062a4d
tests: Add a regression test for issue #392 (aliases beginning with a '+' are lost).
hace 7 años
Daniel Shahaf
67be62107b
tests: Move some code in preparation for next commit. No functional change.
hace 7 años
Daniel Shahaf
2b303f01b6
dev tools: Automagically handle newlines (\n) in $BUFFER.
hace 8 años
Daniel Shahaf
a2876fb57d
dev tools: Add a TODO to introduce code reuse.
hace 8 años
Daniel Shahaf
a053768627
dev tools: Remove a superfluous empty line.
hace 8 años
Daniel Shahaf
5627fd2045
dev tools: Stage the copyright block to make diffs smaller.
hace 8 años
Daniel Shahaf
987c133486
dev tools: Tolerate invalid input.
hace 8 años
Daniel Shahaf
e15a09840e
dev tools: Automate a recurring step: Set year correctly for new tests.
hace 8 años
Daniel Shahaf
e2f863c151
minor: Fix typo in development usage message.
hace 8 años
Daniel Shahaf
add6825898
dev tools: Extend tests/generate.zsh.
hace 8 años
Daniel Shahaf
8013dc3b8d
dev tools: Add a script that generates a test-data file.
hace 8 años
Daniel Shahaf
fccf92402b
minor: tests: Formatting tweak to XPASS output.
Remove superfluous single quotes around the second hyphen.
hace 8 años
Matthew Martin
d37c55c788
minor: tests: Add comment for NONE in expected_region_highlight
hace 8 años
Matthew Martin
364f206a54
docs: Give example of test that modifies its environment
hace 8 años
Matthew Martin
19acd8e844
docs: Mention `$BUFFER`
hace 8 años
Matthew Martin
13018f3dd7
docs: Document use of NONE in expected_region_highlight
hace 8 años
Matthew Martin
1082067f93
tests: Fail on stderr output
Closes #291 .
hace 8 años
Daniel Shahaf
f0bae44b76
tests: Followup to last: echo(1) is evil.
Use 'print -r --' instead, so literal backslashes in $BUFFER aren't expanded.
Found-by: Matthew Martin
hace 8 años
Daniel Shahaf
3176b9567c
minor: tests: Quote $BUFFER differently on output.
The new output improves readability of the 'main' highlighter's test output.
hace 8 años
Daniel Shahaf
6aa57d60aa
tests: TAP support: Emit a 'description' for all test points
hace 8 años
Daniel Shahaf
f83bca0847
minor: tests: Introduce a local variable. No functional change.
hace 8 años
Daniel Shahaf
70b5687d66
minor: tests: Tighten up local variable scope.
hace 8 años
Daniel Shahaf
21207c336a
tests: TAP compliance: Do not emit literal '#' in the 'description' part
hace 8 años
Daniel Shahaf
56a867076c
tests: Followup to fd061b5730bf: quote both expected and actual output.
hace 8 años
Matthew Martin
eaa4335c34
tests: Set ZSH_HIGHLIGHT_STYLES=() during tests
Since the _zsh_highlight_add_highlight that the tests use ignores
ZSH_HIGHLIGHT_STYLES, we can test both an injective mapping and an empty
mapping at once.
hace 8 años
Matthew Martin
d3678ec7a8
tests: Remove unused_highlight
hace 8 años
Matthew Martin
fd061b5730
tests: Test ZSH_HIGHLIGHT_STYLES keys directly
Closes #287 . Testing the keys directly removes the need for
unused_highlight which will be removed next.
hace 8 años
Matthew Martin
4da9889d15
tests: Use 'NONE' to denote no highlighting
'none' is a valid highlighting type. Since by convention styles are all
lowercase, 'NONE' shouldn't conflict with anything.
Closes #289 .
hace 8 años
Daniel Shahaf
f34714b8ee
Bump copyright years.
hace 8 años
Matthew Martin
a830613467
tests: Specify the style key instead of the style itself
hace 8 años
Matthew Martin
31ac2b36a9
tests: Quote style in expected_region_highlight
hace 8 años
Matthew Martin
bb8d325c0c
tests: Fix grep syntax
In basic regular expressions | is not a special character that spearates
branches, so use an extended regular expression.
hace 8 años
Daniel Shahaf
30d8f92df2
test harness: Properly quote error message interpolations.
No functional change, except that error messages are now more readable.
hace 8 años
Daniel Shahaf
9b64ad750f
tests: Add a 'print failures only' mode to 'make test', called 'make quiet-test'.
Fixes zsh-users/zsh-syntax-highlighting#262 .
Currently, 'make quiet-test' uses Perl. However, since it is considered a development
tool rather than a user-facing tool, users and downstream packages needn't install Perl.
Furthermore, even this dev-only dependency may be dropped in the future.
The only difference between tests/tap-filter here and the one in the issue is using
a `cat` subshell v. using 'undef $/; <STDIN>'.
hace 8 años
Daniel Shahaf
936e2e9314
tests: Add another comment. No functional change.
hace 8 años
Daniel Shahaf
268656d52b
tests: Add a comment. No functional change.
hace 8 años
Daniel Shahaf
b989ae23d0
docs copyedit: Rewrap to 80 columns, part 3.
hace 8 años