(t *testing.T)
| 76 | } |
| 77 | |
| 78 | func TestHeadMaxLen_Fail(t *testing.T) { |
| 79 | r := &rule.HeadMaxLenRule{} |
| 80 | if err := r.Apply(lint.RuleSetting{Argument: 10}); err != nil { |
| 81 | t.Fatal(err) |
| 82 | } |
| 83 | _, ok := r.Validate(&mockCommit{header: "this header is way too long"}) |
| 84 | if ok { |
| 85 | t.Error("header > 10 should fail") |
| 86 | } |
| 87 | } |
| 88 | |
| 89 | func TestHeadMaxLen_NegativeDisables(t *testing.T) { |
| 90 | r := &rule.HeadMaxLenRule{} |