Documentation ¶
Overview ¶
Package texsting supports the use of texst in your Go tests.
Example reads reference text from TestError.texst:
func TestError(t *testing.T) { resp, _ := http.Get("https://httpbin.org/get") defer resp.Body.Close() Error(t, "", resp.Body) }
Reference Text:
> { > "args": {}, > "headers": { > "Accept-Encoding": "gzip", > "Host": "httpbin.org", > "User-Agent": "Go-http-client/2.0", * aaaaaaaaaaaaaaaaaa > "X-Amzn-Trace-Id": "Root=1-602f798d-1c84bdc472ff9a2d3ec50f3b" = u uuuuuuuu uuuuuuuuuuuuuuuuuuuuuuuu > }, > "origin": "10.0.0.1", + aa a a a > "url": "https://httpbin.org/get" > }
Index ¶
Constants ¶
View Source
const ( StdSuffix = ".texst" NoSuffix = "\x00" )
Variables ¶
This section is empty.
Functions ¶
func MismatchError ¶ added in v0.4.2
Types ¶
Click to show internal directories.
Click to hide internal directories.