(t *testing.T)
| 726 | } |
| 727 | |
| 728 | func TestEscapeTextInvalidChar(t *testing.T) { |
| 729 | input := []byte("A \x00 terminated string.") |
| 730 | expected := "A \uFFFD terminated string." |
| 731 | |
| 732 | buff := new(bytes.Buffer) |
| 733 | if err := EscapeText(buff, input); err != nil { |
| 734 | t.Fatalf("have %v, want nil", err) |
| 735 | } |
| 736 | text := buff.String() |
| 737 | |
| 738 | if text != expected { |
| 739 | t.Errorf("have %v, want %v", text, expected) |
| 740 | } |
| 741 | } |
| 742 | |
| 743 | func TestIssue5880(t *testing.T) { |
| 744 | type T []byte |
nothing calls this directly
no test coverage detected