(t *testing.T)
| 33 | } |
| 34 | |
| 35 | func TestIsASCIIText(t *testing.T) { |
| 36 | notASCIIText := []string{ |
| 37 | "", "\xC2", "\xC2\xA2", "\xFF", "\x80", "\xF0", "\n", "\t", |
| 38 | } |
| 39 | for _, v := range notASCIIText { |
| 40 | require.False(t, IsASCIIText(v), "%q is not ascii-text", v) |
| 41 | } |
| 42 | asciiText := []string{ |
| 43 | " ", ".", "x", "$", "_", "abcdefg;", "-", "0x00", "0", "123", |
| 44 | } |
| 45 | for _, v := range asciiText { |
| 46 | require.True(t, IsASCIIText(v), "%q is ascii-text", v) |
| 47 | } |
| 48 | } |
| 49 | |
| 50 | func TestASCIITrim(t *testing.T) { |
| 51 | require.Equal(t, ASCIITrim(" "), "") |
nothing calls this directly
no test coverage detected
searching dependent graphs…