zunit: First test for extended version of zunit (patch sent to upstream)

This commit is contained in:
Sebastian Gniazdowski
2019-07-18 03:07:26 +02:00
parent b16bf9d05d
commit 1a5ab22665
6 changed files with 38 additions and 0 deletions
+13
View File
@@ -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
+8
View File
@@ -0,0 +1,8 @@
tap: false
directories:
tests: tests
output: tests/_output
support: tests/_support
time_limit: 0
fail_fast: false
allow_risky: false
View File
View File
+2
View File
@@ -0,0 +1,2 @@
#!/usr/bin/env zsh
# Write your bootstrap code here
+15
View File
@@ -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