(t *testing.T)
| 9 | ) |
| 10 | |
| 11 | func TestRemoveExcessiveWhitespace(t *testing.T) { |
| 12 | tests := []struct { |
| 13 | name string |
| 14 | input string |
| 15 | want string |
| 16 | }{ |
| 17 | { |
| 18 | name: "nothing to remove", |
| 19 | input: "one two three", |
| 20 | want: "one two three", |
| 21 | }, |
| 22 | { |
| 23 | name: "whitespace b-gone", |
| 24 | input: "\n one\n\t two three\r\n ", |
| 25 | want: "one two three", |
| 26 | }, |
| 27 | } |
| 28 | for _, tt := range tests { |
| 29 | t.Run(tt.name, func(t *testing.T) { |
| 30 | got := RemoveExcessiveWhitespace(tt.input) |
| 31 | assert.Equal(t, tt.want, got) |
| 32 | }) |
| 33 | } |
| 34 | } |
| 35 | |
| 36 | func TestFuzzyAgoAbbr(t *testing.T) { |
| 37 | const form = "2006-Jan-02 15:04:05" |
nothing calls this directly
no test coverage detected