mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-12-04 21:56:45 +01:00
test harness: Fix off-by-one discrepancy between observed and expected.
Fixes issue #195.
This commit is contained in:
parent
6d93ea07fd
commit
c46b8d169e
13 changed files with 40 additions and 30 deletions
|
|
@ -32,5 +32,5 @@ PREBUFFER=$'echo \\\n'
|
|||
BUFFER='noglob'
|
||||
|
||||
expected_region_highlight=(
|
||||
"0 6 none" # 'noglob' highlighted as a string, not as a precomand
|
||||
"1 6 none" # 'noglob' highlighted as a string, not as a precomand
|
||||
)
|
||||
|
|
|
|||
|
|
@ -32,6 +32,6 @@ PREBUFFER=$'echo "foo1\n'
|
|||
BUFFER='foo2" ./'
|
||||
|
||||
expected_region_highlight=(
|
||||
"0 5 $ZSH_HIGHLIGHT_STYLES[double-quoted-argument]" # 'foo2"'
|
||||
"1 5 $ZSH_HIGHLIGHT_STYLES[double-quoted-argument]" # 'foo2"'
|
||||
"7 8 $ZSH_HIGHLIGHT_STYLES[path]" # './'
|
||||
)
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ BUFFER='>/tmp >/tmp sudo echo foo'
|
|||
|
||||
expected_region_highlight=(
|
||||
"2 5 $ZSH_HIGHLIGHT_STYLES[path]" # /tmp
|
||||
"7 11 $ZSH_HIGHLIGHT_STYLES[path]" # /tmp
|
||||
"8 11 $ZSH_HIGHLIGHT_STYLES[path]" # /tmp
|
||||
"13 16 $ZSH_HIGHLIGHT_STYLES[precommand]" # sudo
|
||||
"18 21 $ZSH_HIGHLIGHT_STYLES[builtin]" # echo
|
||||
"23 25 $ZSH_HIGHLIGHT_STYLES[default]" # foo
|
||||
|
|
|
|||
|
|
@ -34,6 +34,6 @@ expected_region_highlight=(
|
|||
"1 2 $ZSH_HIGHLIGHT_STYLES[command]" # ps
|
||||
"4 6 $ZSH_HIGHLIGHT_STYLES[default]" # aux
|
||||
"8 8 $ZSH_HIGHLIGHT_STYLES[default]" # |
|
||||
"9 12 $ZSH_HIGHLIGHT_STYLES[command]" # grep
|
||||
"14 17 $ZSH_HIGHLIGHT_STYLES[default]" # java
|
||||
"10 13 $ZSH_HIGHLIGHT_STYLES[command]" # grep
|
||||
"15 18 $ZSH_HIGHLIGHT_STYLES[default]" # java
|
||||
)
|
||||
|
|
|
|||
|
|
@ -32,9 +32,9 @@ PREBUFFER=$'echo foo; echo bar\n\n\n'
|
|||
BUFFER=' echo baz; echo qux'
|
||||
|
||||
expected_region_highlight=(
|
||||
"1 5 $ZSH_HIGHLIGHT_STYLES[builtin]" # echo
|
||||
"6 8 $ZSH_HIGHLIGHT_STYLES[default]" # baz
|
||||
"9 10 $ZSH_HIGHLIGHT_STYLES[default]" # semicolon
|
||||
"2 5 $ZSH_HIGHLIGHT_STYLES[builtin]" # echo
|
||||
"7 9 $ZSH_HIGHLIGHT_STYLES[default]" # baz
|
||||
"10 10 $ZSH_HIGHLIGHT_STYLES[default]" # semicolon
|
||||
"12 15 $ZSH_HIGHLIGHT_STYLES[builtin]" # echo
|
||||
"17 19 $ZSH_HIGHLIGHT_STYLES[default]" # qux
|
||||
)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue