aboutsummaryrefslogtreecommitdiff
path: root/.config/shell/zsh-fast-syntax-highlighting/tests/example.zunit
blob: 910f8408923e2037f685b74ef336853152988c92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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