(t *testing.T)
| 415 | } |
| 416 | |
| 417 | func TestScopeCharset_Pass(t *testing.T) { |
| 418 | r := &rule.ScopeCharsetRule{} |
| 419 | if err := r.Apply(lint.RuleSetting{Argument: "abcdefghijklmnopqrstuvwxyz/"}); err != nil { |
| 420 | t.Fatal(err) |
| 421 | } |
| 422 | _, ok := r.Validate(&mockCommit{scope: "auth/core"}) |
| 423 | if !ok { |
| 424 | t.Error("scope with / should pass") |
| 425 | } |
| 426 | } |
| 427 | |
| 428 | func TestScopeCharset_Fail(t *testing.T) { |
| 429 | r := &rule.ScopeCharsetRule{} |