Some checks failed
CodeQL / Analyze (go) (push) Successful in 6m28s
Docker Image / build-docker (push) Failing after 13m26s
Lint and Testing / lint (push) Successful in 11m17s
Lint and Testing / test (push) Successful in 11m17s
Lint and Testing / golangci (push) Successful in 2m40s
24 lines
551 B
Go
24 lines
551 B
Go
package config
|
|
|
|
import "testing"
|
|
|
|
func TestDefaultGarbage(t *testing.T) {
|
|
if len(DefaultGarbage()) == 0 || DefaultGarbage()[0] != "*выбая*" {
|
|
t.Fatalf("got %v", DefaultGarbage())
|
|
}
|
|
}
|
|
|
|
func TestAPI_GarbagePatterns_default(t *testing.T) {
|
|
p := (API{}).GarbagePatterns()
|
|
if len(p) != 1 || p[0] != "*выбая*" {
|
|
t.Fatalf("got %v", p)
|
|
}
|
|
}
|
|
|
|
func TestAPI_GarbagePatterns_explicitEmpty(t *testing.T) {
|
|
p := (API{Garbage: []string{}}).GarbagePatterns()
|
|
if len(p) != 0 {
|
|
t.Fatalf("got %v", p)
|
|
}
|
|
}
|