Skip to content

Commit 1a5ab22

Browse files
committed
zunit: First test for extended version of zunit (patch sent to upstream)
1 parent b16bf9d commit 1a5ab22

File tree

6 files changed

+38
-0
lines changed

6 files changed

+38
-0
lines changed

.travis.yml

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
addons:
2+
apt:
3+
packages:
4+
zsh
5+
install:
6+
- mkdir .bin
7+
- curl -L https://github.com/zunit-zsh/zunit/releases/download/v0.8.2/zunit > .bin/zunit
8+
- curl -L https://raw.githubusercontent.com/molovo/revolver/master/revolver > .bin/revolver
9+
- curl -L https://raw.githubusercontent.com/molovo/color/master/color.zsh > .bin/color
10+
before_script:
11+
- chmod u+x .bin/{color,revolver,zunit}
12+
- export PATH="$PWD/.bin:$PATH"
13+
script: zunit

.zunit.yml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
tap: false
2+
directories:
3+
tests: tests
4+
output: tests/_output
5+
support: tests/_support
6+
time_limit: 0
7+
fail_fast: false
8+
allow_risky: false

tests/_output/.gitkeep

Whitespace-only changes.

tests/_support/.gitkeep

Whitespace-only changes.

tests/_support/bootstrap

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env zsh
2+
# Write your bootstrap code here

tests/example.zunit

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/usr/bin/env zunit
2+
@setup {
3+
load "../fast-highlight"
4+
}
5+
6+
@test 'ls /usr/bin' {
7+
PREBUFFER=""
8+
BUFFER="ls /usr/bin"
9+
run -fast-highlight-process "$PREBUFFER" "$BUFFER" 0 \; print -rl -- \$reply
10+
11+
assert "$lines[1]" same_as "0 2 fg=green"
12+
assert "$lines[2]" same_as "3 11 fg=magenta,underline"
13+
}
14+
15+
# vim:ft=zsh:sw=4:sts=4:et

0 commit comments

Comments
 (0)