Documentation
¶
Index ¶
- func DirsMatch(t *testing.T, expectedName, actualName string, lrs ...ReaderLineReplacer)
- func FileStringContains(t *testing.T, name string, expected ...string)
- func FilesMatch(t *testing.T, expectedName, actualName string, lrs ...ReaderLineReplacer)
- func MatchRegexp(t *testing.T, subject string, expectedReStr ...string)
- func ReaderStringContains(t *testing.T, r io.Reader, expected ...string)
- func ReadersMatch(t *testing.T, expectedName string, expected io.Reader, actualName string, ...)
- func StringContains(t *testing.T, subject string, expected ...string)
- func StringSliceExactly(t *testing.T, expected []string, actual []string)
- func StringSortedSliceExactly(t *testing.T, expected []string, actual []string)
- type ReaderLineReplacer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirsMatch ¶
func DirsMatch(t *testing.T, expectedName, actualName string, lrs ...ReaderLineReplacer)
func FilesMatch ¶
func FilesMatch(t *testing.T, expectedName, actualName string, lrs ...ReaderLineReplacer)
func ReaderStringContains ¶
func ReadersMatch ¶
Types ¶
type ReaderLineReplacer ¶
ReaderLineReplacer receives an "actual" line, from an expected vs. actual test comparison, and optionally returns a new "actual" line value.
For example, if the actual values will change over time (e.g. "go <semver>" strings in new go.mod files), a ReaderLineReplacer can allow test fixtures to have out-dated semver values (which are not the SUT) by replacing the dynamic value with the expected static value.
The expectedName and actualName values are the reader (e.g. file) names.