all repos

viye @ f5220eb9c9864e1616859fb0141dad6cfe5f321a

my shot at reimplementing xiki

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

Oleksandr Smirnov Oleksandr Smirnov
olexsmir@gmail.com
refactor, 1 month ago
1
package gobin
2
3
import (
4
	"testing"
5
6
	"github.com/olexsmir/viye/internal/viye"
7
	"olexsmir.xyz/x/is"
8
)
9
10
func TestMatch(t *testing.T) {
11
	tests := []struct {
12
		cmd  string
13
		args []string
14
		want bool
15
	}{
16
		{"go", nil, true},
17
		{"go", []string{"test"}, true},
18
		{"go", []string{"test", "./..."}, true},
19
		{"other", nil, false},
20
		{"", nil, false},
21
	}
22
	for _, tt := range tests {
23
		got := (Tool{}).Match(&viye.Context{Cmd: tt.cmd, Args: tt.args})
24
		is.Equal(t, tt.want, got)
25
	}
26
}
27
28
func TestExecute(t *testing.T) {
29
	t.Skipf("TODO implement")
30
}