Daniel Shahaf
51b9d79c3b
'main': Highlight mismatched parentheses and braces.
8 лет назад
Daniel Shahaf
02807f1826
'main': Support the IGNORE_BRACES option.
This is related to a future "unbalanced { ( ) }" check for issue #344 .
8 лет назад
Daniel Shahaf
a8a6384356
'main': Add tests for the IGNORE_BRACES option.
Also adds an XFail test for balanced braces for issue #344 .
8 лет назад
Daniel Shahaf
757d047f09
'main': The word after 'sudo' is only a non-command word if it is an option.
8 лет назад
m0viefreak
5bae621900
driver: Always bind zle-line-finish and use it instead of accept-*
Special handling for cursor imprint or partial path highlighting
is needed in more cases than accept-*. For example when accepting
a line from isearch, no accept-* widget is invoked.
The proper way is to use zle-line-finish.
Trumps #259 .
Fixes #284 .
8 лет назад
Daniel Shahaf
fa57633d81
'main': Enable test for issue #238 .
8 лет назад
Daniel Shahaf
0d41933c61
'main': Add test for issue #343 , concerning the 'command' precommand.
8 лет назад
Daniel Shahaf
6b69389bd9
'main': New test, related to issue #328 .
The test passes so I'm adding it directly to master.
8 лет назад
Daniel Shahaf
53083da821
'main': Highlight a broken symlink as a file.
Fixes #342 .
8 лет назад
Daniel Shahaf
95f7206a93
tests: Add an XFail test for issue #342 .
8 лет назад
Daniel Shahaf
ee07588cfd
tests: Add a regression test for issue #267 , concerning highlighting a vi linewise region.
8 лет назад
Daniel Shahaf
7fb6f99791
'main': Try the "non-command word" codepath when a word may be either a command word or a non-command word.
Fixes #231 .
Fixes #330 .
8 лет назад
Daniel Shahaf
29b30e0ca7
'main': Add XFail test for issue #330 , concerning command word after array assignment.
8 лет назад
Daniel Shahaf
f4036a09ce
'main': Highlight scalar assignments to argv
Assignments to positional parameters using scalar assignment syntax is
a feature: it is covered by upstream's test suite ("append to positional
parameter" in Test/A06assign.ztst).
8 лет назад
Daniel Shahaf
14711a51f3
tests: Explicitly test 'default' style inside an array assignment.
8 лет назад
m0viefreak
6cd39e7c70
'main': Highlight path separators
This commit is based on the work done by
Jorge Israel Peña (blaenk) in #136 .
Changes:
* Adjusted to changes on the latest master branch.
* Use regular path highlighter colors by default.
* Break out early if the separator color is the same to
improve performance.
* Tests.
8 лет назад
m0viefreak
12b879caf7
'main': Use zsh/parameter instead of type -w
If possible, try to use the zsh/parameter module to get
information about a shell words.
This avoids subshells and is a huge speed improvement
on systems such as cygwin.
Note 1:
$commands does not know about PATH_DIRS. So in case
PATH_DIRS is set, 'type -w' is still used if nothing
else matches.
Note 2:
zsh/parameter can't distinguish between 'command' and
'hashed'. Adjusted the test for that case to XFAIL.
The ideal solution would be if whence had an option to
put the result in REPLY instead of printing it to stdout.
8 лет назад
Daniel Shahaf
6362c757b6
tests: Extend issue #290 test with another variant.
The test being extended is highlighters/main/test-data/control-flow2.zsh.
8 лет назад
Daniel Shahaf
ef68f50c04
'main': Fix issue #290 , «Mishighlights "longloops" 'repeat'».
8 лет назад
Daniel Shahaf
4832f18c50
tests: New test for issue #290 , «Mishighlights "longloops" 'repeat'».
8 лет назад
Daniel Shahaf
62f1c108f3
tests: New test to capture off-by-ones.
Inspired by #312 .
8 лет назад
Daniel Shahaf
fc9c892a3f
'main': Fix issue #302 , "Process substitution misparsed as redirection".
8 лет назад
Daniel Shahaf
6889ff6bd2
'main': Add a regression test for issue #302 , "Process substitution misparsed as redirection".
8 лет назад
Matthew Martin
d3678ec7a8
tests: Remove unused_highlight
8 лет назад
Matthew Martin
a830613467
tests: Specify the style key instead of the style itself
8 лет назад
Matthew Martin
78290e043b
tests: Expect the correct style
8 лет назад
Matthew Martin
31ac2b36a9
tests: Quote style in expected_region_highlight
8 лет назад
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 лет назад
Daniel Shahaf
28932316cc
aliases: Highlight aliases with '=' in their LHS as error. (Part of issue #263.)
8 лет назад
Daniel Shahaf
5e4b446dee
aliases: Add a test for one variant of issue #263 .
8 лет назад
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 лет назад
Daniel Shahaf
48ecd29180
tests: Add two XFail tests for issue #238 , "fd redirections at command word".
8 лет назад
Daniel Shahaf
430cf55368
tests: Cover [default].
8 лет назад
Daniel Shahaf
46cd970bc4
tests: Improve tests by using $unused_highlight.
The default for [redirection] is 'none', so it wasn't actually being tested.
8 лет назад
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 лет назад
Daniel Shahaf
29fd6ec1de
Support the '|&', '&!', '&|' command separators.
8 лет назад
Daniel Shahaf
79b95c629e
Drop unnecessary shebang lines.
Done in c30301d474
and
c687bddea3
for other tests.
8 лет назад
Daniel Shahaf
3669d69226
Fix copyright year.
8 лет назад
Daniel Shahaf
4fcfb15913
Highlight parameter expansions that are a command word.
Fixes zsh-users/zsh-syntax-highlighting#101 .
8 лет назад
Daniel Shahaf
6e3720f39d
dollar-double-quoted-argument: Support the syntax «"${foo}"». (Issue #186.)
8 лет назад
Daniel Shahaf
28776371a0
tests: Add an XFail test for highlighting «"${foo}"». (Issue #186.)
8 лет назад
Daniel Shahaf
96ee5116b1
Fix issue #228 , "Support the PATH_DIRS option".
8 лет назад
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 лет назад
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 лет назад
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 лет назад
Daniel Shahaf
3620ad951f
Add an XFail test for issue #231 , "Assignment terminating subshell flags closing parenthesis as an error".
8 лет назад
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 лет назад
Daniel Shahaf
c0dafd1d85
brackets: Highlight the closing brackets of subshells and blocks. (Issue #226.)
9 лет назад
Daniel Shahaf
a59f442d2d
brackets: Highlight the closing brackets of arithmetic expansion. (Issue #226.)
9 лет назад
Daniel Shahaf
8b4adbd991
Fix issue #222 , "command word after repeat".
9 лет назад