mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
tests: Extend and document the after-a-parse-error aspects of the issue #651 test.
This commit is contained in:
parent
81267ca313
commit
498cc7641f
1 changed files with 6 additions and 1 deletions
|
|
@ -29,11 +29,16 @@
|
||||||
# -------------------------------------------------------------------------------------------------
|
# -------------------------------------------------------------------------------------------------
|
||||||
|
|
||||||
BUFFER=$'a=( foo | bar )'
|
BUFFER=$'a=( foo | bar )'
|
||||||
|
bar(){}
|
||||||
|
|
||||||
expected_region_highlight=(
|
expected_region_highlight=(
|
||||||
'1 3 assign' # a=(
|
'1 3 assign' # a=(
|
||||||
'5 7 default' # foo
|
'5 7 default' # foo
|
||||||
'9 9 unknown-token' # |
|
'9 9 unknown-token' # |
|
||||||
'11 13 unknown-token' # bar
|
# zsh reports a parse error at this point. Nevertheless, we test how we
|
||||||
|
# highlight the remainder of $BUFFER. Currently we recover by treating the pipe
|
||||||
|
# as a command separator. That's not the only reasonable behaviour, though; if
|
||||||
|
# we change the behaviour, we should adjust the following expectations accordingly.
|
||||||
|
'11 13 function' # bar
|
||||||
'15 15 unknown-token' # )
|
'15 15 unknown-token' # )
|
||||||
)
|
)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue