Daniel Shahaf
62f1c108f3
tests: New test to capture off-by-ones.
Inspired by #312 .
8 years ago
Daniel Shahaf
fc9c892a3f
'main': Fix issue #302 , "Process substitution misparsed as redirection".
8 years ago
Daniel Shahaf
6889ff6bd2
'main': Add a regression test for issue #302 , "Process substitution misparsed as redirection".
8 years ago
Matthew Martin
d3678ec7a8
tests: Remove unused_highlight
8 years ago
Matthew Martin
a830613467
tests: Specify the style key instead of the style itself
8 years ago
Matthew Martin
78290e043b
tests: Expect the correct style
8 years ago
Matthew Martin
31ac2b36a9
tests: Quote style in expected_region_highlight
8 years ago
Daniel Shahaf
4c23a2fd1b
'main': Highlight lone '!' correctly: it's not a history expansion.
While here, also add a test for the '!' reserved word (which is highlighted
since c216242b
).
8 years ago
Daniel Shahaf
28932316cc
aliases: Highlight aliases with '=' in their LHS as error. (Part of issue #263.)
8 years ago
Daniel Shahaf
5e4b446dee
aliases: Add a test for one variant of issue #263 .
8 years ago
Daniel Shahaf
73ee7c1f6c
Fix part of issue #238 , "fd redirections at command word".
This fixes fd's specified by a (single) digit. The named fd syntax remains an XFail.
8 years ago
Daniel Shahaf
48ecd29180
tests: Add two XFail tests for issue #238 , "fd redirections at command word".
8 years ago
Daniel Shahaf
430cf55368
tests: Cover [default].
8 years ago
Daniel Shahaf
46cd970bc4
tests: Improve tests by using $unused_highlight.
The default for [redirection] is 'none', so it wasn't actually being tested.
8 years ago
Daniel Shahaf
09c4114eb9
command word: Do not attempt to interpret command separator tokens as anything else.
The important part of this change is removing the second conjunct from the
condition; the remainder of the change gives one example of when that matters.
8 years ago
Daniel Shahaf
29fd6ec1de
Support the '|&', '&!', '&|' command separators.
8 years ago
Daniel Shahaf
79b95c629e
Drop unnecessary shebang lines.
Done in c30301d474
and
c687bddea3
for other tests.
8 years ago
Daniel Shahaf
3669d69226
Fix copyright year.
8 years ago
Daniel Shahaf
4fcfb15913
Highlight parameter expansions that are a command word.
Fixes zsh-users/zsh-syntax-highlighting#101 .
8 years ago
Daniel Shahaf
6e3720f39d
dollar-double-quoted-argument: Support the syntax «"${foo}"». (Issue #186.)
8 years ago
Daniel Shahaf
28776371a0
tests: Add an XFail test for highlighting «"${foo}"». (Issue #186.)
8 years ago
Daniel Shahaf
96ee5116b1
Fix issue #228 , "Support the PATH_DIRS option".
8 years ago
Daniel Shahaf
a636527f70
tests: Add an XFail test for issue #228 , "Support the PATH_DIRS option".
This builds upon the test harness auto-cleaned-up directories work (c01533920
).
8 years ago
Daniel Shahaf
2b35ff1c15
minor: Rename a test file to a not-escape-needing name.
There's simply no reason to use such names, now that the filename is no longer
itself test data.
8 years ago
Daniel Shahaf
c015339202
tests: Provide an independent, auto-cleaned working directory to each test.
Fixes zsh-users/zsh-syntax-highlighting#182.
Prerequisite for testing issue #228 .
* tests/test-highlighting.zsh
(run_test): Move functionality to run_test_internal; make run_test be a wrapper
that handles creating and cleaning up the tempdir.
* tests/README.md: Document the new feature.
* "highlighters/main/test-data/path-space- .zsh"
* highlighters/main/test-data/path-tilde-named.zsh
* highlighters/main/test-data/path.zsh
Change test data to not depend on being run from the source directory.
8 years ago
Daniel Shahaf
3620ad951f
Add an XFail test for issue #231 , "Assignment terminating subshell flags closing parenthesis as an error".
8 years ago
Daniel Shahaf
b285c7b821
brackets: Highlight closing ')' of array assignments correctly. (Issue #226.)
Followup to c0dafd1d850e582291b41d693369794d1ea31343, which changed the highlight of
those ')'s from <nothing> to [reserved-word].
8 years ago
Daniel Shahaf
c0dafd1d85
brackets: Highlight the closing brackets of subshells and blocks. (Issue #226.)
9 years ago
Daniel Shahaf
a59f442d2d
brackets: Highlight the closing brackets of arithmetic expansion. (Issue #226.)
9 years ago
Daniel Shahaf
8b4adbd991
Fix issue #222 , "command word after repeat".
9 years ago
Daniel Shahaf
6fbd2aa957
Add an XFail test for issue #222 , "command word after repeat".
9 years ago
Daniel Shahaf
9e178f9f39
subshells: Highlight the opening parenthesis correctly. (Issue #166.)
Followup to 0d1bfbcbfa
.
9 years ago
Daniel Shahaf
5a38710564
subshells: Add an XFail test demonstrating that #166 is not yet fixed.
Reported-by: Antony Lee
9 years ago
Daniel Shahaf
1ac39b0af1
comments: Mark prematurely-terminated command as an error.
This is already done for commands prematurely terminated by ";".
9 years ago
Daniel Shahaf
693de99a90
comments: Fix issue #163 and #167 : Highlight comments.
9 years ago
Daniel Shahaf
e76f208cf8
comments: Add a PASSing test for the NO_INTERACTIVE_COMMENTS case.
9 years ago
Daniel Shahaf
e9ceb2017e
comments: Add XFail tests from issues #163 and #167 .
These tests are based on the patches contributed in those issues:
commit 9d9df4fe80
(upstream/pr/167)
Author: Miciah Masters <miciah.masters@gmail.com>
AuthorDate: Thu Apr 23 20:28:24 2015 -0400
Commit: Miciah Dashiel Butler Masters <mmasters@redhat.com>
CommitDate: Thu Apr 23 20:28:24 2015 -0400
Highlight comments
M highlighters/main/main-highlighter.zsh
A highlighters/main/test-data/comments.zsh
commit d94f1a037f
(upstream/pr/163)
Author: sonnym <michaud.sonny@gmail.com>
AuthorDate: Fri Mar 6 18:27:57 2015 -0500
Commit: sonnym <michaud.sonny@gmail.com>
CommitDate: Fri Mar 6 21:16:27 2015 -0500
highlight comments when interactive_comments is on
M highlighters/main/main-highlighter.zsh
A highlighters/main/test-data/comment-embedded.zsh
A highlighters/main/test-data/comment-leading.zsh
Patch-by: sonnym <michaud.sonny@gmail.com>
Patch-by: Miciah Masters <miciah.masters@gmail.com>
(corrected and refreshed for harness changes by me)
9 years ago
Daniel Shahaf
2f05620b19
sudo: Flag an error when a required argument is missing.
9 years ago
Daniel Shahaf
f49f3bf0c0
sudo: Extend tests.
9 years ago
Daniel Shahaf
a3047a9121
sudo: Highlight an empty `sudo;` as an error.
The word following 'sudo' was considered :regular:, although it isn't.
9 years ago
Daniel Shahaf
86e9249709
sudo/redirections: Fix remaining part of issue #221 , "sudo and redirection don't mix".
9 years ago
Daniel Shahaf
0d1bfbcbfa
Highlight subshells and anonymous functions correctly.
Fixes zsh-users/zsh-syntax-highlighting#166.
Fixes zsh-users/zsh-syntax-highlighting#194.
Builds upon the issue #207 work.
9 years ago
Daniel Shahaf
2218e26bf8
command word: Highlight 'else' correctly. Part of issue #207 .
9 years ago
Daniel Shahaf
b397b12ac1
command word: Start fixing issue #207 , "Word following certain reserved words should be a command word".
9 years ago
Daniel Shahaf
87deac3062
command word: Add an XFail test for issue #207 .
9 years ago
Daniel Shahaf
01d7eeb3c7
Fix issue #205 , "';' after assignment is highlighted as unknown-token".
9 years ago
Daniel Shahaf
be006aded5
sudo/redirections: Fix part of issue #221 , "sudo and redirection don't mix".
9 years ago
Daniel Shahaf
c6355a31b7
Followup to last: re-fix issue #9 and add test for it.
The fix for issue #9 was accidentally broken by the penultimate commit.
Note that we don't care about aliases to ZSH_HIGHLIGHT_TOKENS_COMMANDSEPARATOR
entries, since the code deals with aliases at command position.
9 years ago
Daniel Shahaf
2c9f8c8c95
Fix issue #209 , "precommand modifiers at non-command-word position".
9 years ago
Daniel Shahaf
80d692c400
command word: Add an XFail test for issue #194 , "Highlight anonymous functions".
9 years ago