Documentation ¶
Index ¶
- Variables
- func ComparePart(t *testing.T, got *enmime.Part, want *enmime.Part) (equal bool)
- func ContentContainsString(t *testing.T, b []byte, substr string)
- func ContentEqualsBytes(t *testing.T, b []byte, want []byte)
- func ContentEqualsString(t *testing.T, b []byte, str string)
- func OpenTestData(subdir, filename string) io.Reader
- func TestHelperComparePartsEqual(t *testing.T)
- func TestHelperComparePartsInequal(t *testing.T)
Constants ¶
This section is empty.
Variables ¶
var PartExists = &enmime.Part{}
Syntatic sugar for Part comparisons
Functions ¶
func ComparePart ¶
ComparePart test helper compares the attributes of two parts, returning true if they are equal. t.Errorf() will be called for each field that is not equal. The presence of child and siblings will be checked, but not the attributes of them. Header, Errors and unexported fields are ignored.
func ContentContainsString ¶
ContentContainsString checks if the provided readers content contains the specified substring
func ContentEqualsBytes ¶
ContentEqualsBytes checks if the provided readers content is the specified []byte
func ContentEqualsString ¶
ContentEqualsString checks if the provided readers content is the specified string
func OpenTestData ¶
OpenTestData is a utility function to open a file in testdata for reading, it will panic if there is an error.
func TestHelperComparePartsEqual ¶
TestHelperComparePartsEqual tests compareParts with equalivent Parts
func TestHelperComparePartsInequal ¶
TestHelperComparePartsInequal tests compareParts with differing Parts
Types ¶
This section is empty.