mirror of
https://github.com/zdharma-continuum/fast-syntax-highlighting.git
synced 2026-09-10 07:16:18 -04:00
main.zunit: A new 'tr : \\n <<<$PATH' test
This commit is contained in:
parent
076c94e7db
commit
66824e4a91
|
|
@ -88,4 +88,19 @@ reply=()
|
|||
assert "$reply[6]" same_as ""
|
||||
}
|
||||
|
||||
@test 'tr : \\n <<<$PATH' {
|
||||
reply=()
|
||||
PREBUFFER=""
|
||||
BUFFER='command tr : \\n <<<test$PATH'
|
||||
evl -fast-highlight-process "\$PREBUFFER" "\$BUFFER" 0
|
||||
|
||||
assert "$reply[1]" same_as "0 7 ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}precommand]}"
|
||||
assert "$reply[2]" same_as "8 10 ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}command]}"
|
||||
assert "$reply[3]" same_as "16 19 ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}here-string-tri]}"
|
||||
# BUG?: the text spans over non-text (i.e. var) part
|
||||
assert "$reply[4]" same_as "19 28 ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}here-string-text]}"
|
||||
assert "$reply[5]" same_as "23 28 ${FAST_HIGHLIGHT_STYLES[${FAST_THEME_NAME}here-string-var]}"
|
||||
assert "$reply[6]" same_as ""
|
||||
}
|
||||
|
||||
# vim:ft=zsh:sw=4:sts=4:et
|
||||
|
|
|
|||
Loading…
Reference in a new issue