mirror of
https://github.com/zdharma-continuum/fast-syntax-highlighting.git
synced 2026-08-12 22:31:28 +04:00
zunit: First test for extended version of zunit (patch sent to upstream)
This commit is contained in:
+13
@@ -0,0 +1,13 @@
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
zsh
|
||||
install:
|
||||
- mkdir .bin
|
||||
- curl -L https://github.com/zunit-zsh/zunit/releases/download/v0.8.2/zunit > .bin/zunit
|
||||
- curl -L https://raw.githubusercontent.com/molovo/revolver/master/revolver > .bin/revolver
|
||||
- curl -L https://raw.githubusercontent.com/molovo/color/master/color.zsh > .bin/color
|
||||
before_script:
|
||||
- chmod u+x .bin/{color,revolver,zunit}
|
||||
- export PATH="$PWD/.bin:$PATH"
|
||||
script: zunit
|
||||
@@ -0,0 +1,8 @@
|
||||
tap: false
|
||||
directories:
|
||||
tests: tests
|
||||
output: tests/_output
|
||||
support: tests/_support
|
||||
time_limit: 0
|
||||
fail_fast: false
|
||||
allow_risky: false
|
||||
@@ -0,0 +1,2 @@
|
||||
#!/usr/bin/env zsh
|
||||
# Write your bootstrap code here
|
||||
@@ -0,0 +1,15 @@
|
||||
#!/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
|
||||
Reference in New Issue
Block a user