all repos

viye @ bfdc338

my shot at reimplementing xiki

viye/internal/plumbing/gobin/gobin_test.go (view raw)

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
files: support ./ paths; add gobin; add json, 2 months ago
1
package gobin
2
3
import (
4
	"testing"
5
6
	"github.com/olexsmir/viye/internal/viye"
7
)
8
9
func TestMatch(t *testing.T) {
10
	tests := []struct {
11
		path []string
12
		want bool
13
	}{
14
		{[]string{"go"}, true},
15
		{[]string{"go", "build"}, true},
16
		{[]string{"go", "test", "./..."}, true},
17
		{[]string{"other"}, false},
18
		{[]string{}, false},
19
	}
20
	for _, tt := range tests {
21
		got := (Tool{}).Match(&viye.Context{Path: tt.path})
22
		if got != tt.want {
23
			t.Errorf("Match(%v) = %v; want %v", tt.path, got, tt.want)
24
		}
25
	}
26
}
27
28
func TestExecute(t *testing.T) {
29
	t.Skipf("TODO implement")
30
}