first commit

This commit is contained in:
2020-10-25 10:00:59 +03:00
commit 0bd6f67397
80 changed files with 4741 additions and 0 deletions

30
register_test.go Normal file
View File

@@ -0,0 +1,30 @@
package console_test
import (
"testing"
"gitoa.ru/go-4devs/console"
)
func TestFind(t *testing.T) {
cases := map[string]string{
"fdevs:console:test": "fdevs:console:test",
"fd:c:t": "fdevs:console:test",
"fd::t": "fdevs:console:test",
"f:c:t": "fdevs:console:test",
"f:c:a": "fdevs:console:arg",
}
for name, ex := range cases {
res, err := console.Find(name)
if err != nil {
t.Errorf("expect <nil> err, got:%s", err)
continue
}
if res.Name != ex {
t.Errorf("expect: %s, got: %s", ex, res)
}
}
}