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