Documentation
¶
Index ¶
- Variables
- func AnyOutput(t testing.TB, line []byte) []byte
- func DiffErrs(want, got error) string
- func DoesNotHaveItem(it vocab.Item) itemCheckFn
- func EndOK(t testing.TB, line []byte) []byte
- func EqErrs(want, got error) bool
- func HasActor(u ...vocab.Item) itemCheckFn
- func HasAnyOf(u ...vocab.Item) itemCheckFn
- func HasAttributedTo(u ...vocab.Item) itemCheckFn
- func HasAudience(u ...vocab.Item) itemCheckFn
- func HasCC(cc ...vocab.Item) itemCheckFn
- func HasContent[T ~string | vocab.NaturalLanguageValues](cont T) itemCheckFn
- func HasContext(u ...vocab.Item) itemCheckFn
- func HasEndpoints(e *vocab.Endpoints) itemCheckFn
- func HasExactItems(items ...vocab.Item) itemCheckFn
- func HasFormerType(typ vocab.Typer) itemCheckFn
- func HasID(want vocab.IRI) itemCheckFn
- func HasInReplyTo(u ...vocab.Item) itemCheckFn
- func HasInbox(want vocab.IRI) itemCheckFn
- func HasItem(it vocab.Item) itemCheckFn
- func HasMediaType(mt vocab.MimeType) itemCheckFn
- func HasName[T ~string | vocab.NaturalLanguageValues](cont T) itemCheckFn
- func HasObject(u ...vocab.Item) itemCheckFn
- func HasOneOf(u ...vocab.Item) itemCheckFn
- func HasOrigin(u ...vocab.Item) itemCheckFn
- func HasOutbox(want vocab.IRI) itemCheckFn
- func HasPreferredUsername[T ~string | vocab.NaturalLanguageValues](name T) itemCheckFn
- func HasProxyURL(iri vocab.IRI) itemCheckFn
- func HasPublicKey(pub vocab.PublicKey) itemCheckFn
- func HasReplies(want vocab.IRI) itemCheckFn
- func HasSharedInbox(iri vocab.Item) itemCheckFn
- func HasSource[T ~string | vocab.NaturalLanguageValues](cont T, mt vocab.MimeType) itemCheckFn
- func HasStreams(u ...vocab.Item) itemCheckFn
- func HasSummary[T ~string | vocab.NaturalLanguageValues](cont T) itemCheckFn
- func HasTag(u vocab.Item) itemCheckFn
- func HasTarget(u ...vocab.Item) itemCheckFn
- func HasTo(to ...vocab.Item) itemCheckFn
- func HasTotalItems(cnt int) itemCheckFn
- func HasURL(u ...vocab.Item) itemCheckFn
- func IsType(typ vocab.Typer) itemCheckFn
- func MatchToken(t testing.TB, i []byte) []byte
- func Request() *reqBuilder
- func Response() resChecks
- func WasDeleted(d time.Time) itemCheckFn
- func WasPublished(d time.Time) itemCheckFn
- func WasUpdated(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 DoesNotHaveItem ¶
func HasAttributedTo ¶
func HasAudience ¶
func HasContent ¶
func HasContent[T ~string | vocab.NaturalLanguageValues](cont T) itemCheckFn
func HasContext ¶
func HasEndpoints ¶
func HasExactItems ¶
func HasFormerType ¶
func HasInReplyTo ¶
func HasMediaType ¶
func HasName ¶
func HasName[T ~string | vocab.NaturalLanguageValues](cont T) itemCheckFn
func HasPreferredUsername ¶
func HasPreferredUsername[T ~string | vocab.NaturalLanguageValues](name T) itemCheckFn
func HasProxyURL ¶
func HasPublicKey ¶
func HasReplies ¶
func HasSharedInbox ¶
func HasSource ¶
func HasSource[T ~string | vocab.NaturalLanguageValues](cont T, mt vocab.MimeType) itemCheckFn
func HasStreams ¶
func HasSummary ¶
func HasSummary[T ~string | vocab.NaturalLanguageValues](cont T) itemCheckFn
func HasTotalItems ¶
func HasTotalItems(cnt int) itemCheckFn
func WasDeleted ¶
func WasPublished ¶
func WasUpdated ¶
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.