Documentation
¶
Index ¶
- Variables
- func AnyOutput(t testing.TB, line []byte) []byte
- func DiffErrs(want, got error) string
- func EndOK(t testing.TB, line []byte) []byte
- func EqErrs(want, got error) bool
- func HasActor(iri vocab.IRI) itemCheckFn
- func HasContent[T ~string | vocab.NaturalLanguageValues](cont T) itemCheckFn
- func HasObject(iri vocab.IRI) itemCheckFn
- func HasPreferredUsername[T ~string | vocab.NaturalLanguageValues](name T) itemCheckFn
- func HasURL(u string) itemCheckFn
- func IsType(typ vocab.ActivityVocabularyType) itemCheckFn
- func MatchToken(t testing.TB, i []byte) []byte
- func Request() *reqBuilder
- func Response() resChecks
- func WasPublished(d time.Time) itemCheckFn
- func WithTests(testFns ...LineOutputTest) ioTestFn
- type CommandTest
- type HTTPTest
- type LineOutputTest
- type RunnableTest
- type TestSuite
Constants ¶
This section is empty.
Variables ¶
View Source
var ( URLRegexp = regexp.MustCompile(`((?:http|https)://[a-zA-Z0-9./-]+)`) PassMatch = MatchesString(`Password: `) ConfirmMatch = MatchesString(` Confirm: `) )
View Source
var CR = []byte{'\n'}
View Source
var CRLF = []byte{'\r', '\n'}
View Source
var EquateWeakErrors = cmp.FilterValues(areErrors, cmp.Comparer(compareErrors))
Functions ¶
func HasContent ¶
func HasContent[T ~string | vocab.NaturalLanguageValues](cont T) itemCheckFn
func HasPreferredUsername ¶
func HasPreferredUsername[T ~string | vocab.NaturalLanguageValues](name T) itemCheckFn
func IsType ¶
func IsType(typ vocab.ActivityVocabularyType) itemCheckFn
func WasPublished ¶
func WithTests ¶
func WithTests(testFns ...LineOutputTest) ioTestFn
Types ¶
type CommandTest ¶
type CommandTest struct {
Name string
Host string
Cmd tc.Executable
IO ioTestFn
WantErr error
}
func (CommandTest) Label ¶
func (c CommandTest) Label() string
type LineOutputTest ¶
func ExtractActorIRI ¶
func ExtractActorIRI(iri *vocab.IRI) LineOutputTest
func GetToken ¶
func GetToken(token *c2s.BearerSigner) LineOutputTest
func MatchesRegexp ¶
func MatchesRegexp(r *regexp.Regexp) LineOutputTest
func MatchesString ¶
func MatchesString(s string) LineOutputTest
func WithInput ¶
func WithInput(r LineOutputTest, input string) LineOutputTest
type RunnableTest ¶
Click to show internal directories.
Click to hide internal directories.