configs/home/.zsh/plugins/fast-syntax-highlighting/tests/example.zunit

16 lines
343 B
Plaintext
Raw Permalink Normal View History

2022-12-01 13:28:20 +01:00
#!/usr/bin/env zunit
@setup {
load "../fast-highlight"
}
@test 'ls /usr/bin' {
PREBUFFER=""
BUFFER="ls /usr/bin"
run -fast-highlight-process "$PREBUFFER" "$BUFFER" 0 \; print -rl -- \$reply
assert "$lines[1]" same_as "0 2 fg=green"
assert "$lines[2]" same_as "3 11 fg=magenta,underline"
}
# vim:ft=zsh:sw=4:sts=4:et