(t *testing.T)
| 144 | } |
| 145 | |
| 146 | func TestBodyMaxLineLen_Pass(t *testing.T) { |
| 147 | r := &rule.BodyMaxLineLenRule{} |
| 148 | if err := r.Apply(lint.RuleSetting{Argument: 72}); err != nil { |
| 149 | t.Fatal(err) |
| 150 | } |
| 151 | _, ok := r.Validate(&mockCommit{body: "Short line 1.\nShort line 2."}) |
| 152 | if !ok { |
| 153 | t.Error("all lines <= 72 should pass") |
| 154 | } |
| 155 | } |
| 156 | |
| 157 | func TestBodyMaxLineLen_Fail(t *testing.T) { |
| 158 | r := &rule.BodyMaxLineLenRule{} |