|
2 | 2 |
|
3 | 3 | A collection of packages to augment `testing` and support common patterns.
|
4 | 4 |
|
5 |
| -[](https://godoc.org/gotest.tools) |
| 5 | +[](http://gotest.tools) |
6 | 6 | [](https://circleci.com/gh/gotestyourself/gotest.tools/tree/master)
|
7 | 7 | [](https://goreportcard.com/report/gotest.tools)
|
8 | 8 |
|
| 9 | +## Usage |
| 10 | + |
| 11 | +With Go modules enabled (go1.11+) |
| 12 | + |
| 13 | +``` |
| 14 | +$ go get gotest.tools/v3 |
| 15 | +``` |
| 16 | + |
| 17 | +``` |
| 18 | +import "gotest.tools/v3/assert" |
| 19 | +``` |
| 20 | + |
| 21 | +To use `gotest.tools` with an older version of Go that does not understand Go |
| 22 | +module paths pin to version `v2.3.0`. |
| 23 | + |
9 | 24 |
|
10 | 25 | ## Packages
|
11 | 26 |
|
12 |
| -* [assert](http://godoc.org/gotest.tools/assert) - |
| 27 | +* [assert](http://gotest.tools/assert) - |
13 | 28 | compare values and fail the test when a comparison fails
|
14 |
| -* [env](http://godoc.org/gotest.tools/env) - |
| 29 | +* [env](http://gotest.tools/env) - |
15 | 30 | test code which uses environment variables
|
16 |
| -* [fs](http://godoc.org/gotest.tools/fs) - |
| 31 | +* [fs](http://gotest.tools/fs) - |
17 | 32 | create temporary files and compare a filesystem tree to an expected value
|
18 |
| -* [golden](http://godoc.org/gotest.tools/golden) - |
| 33 | +* [golden](http://gotest.tools/golden) - |
19 | 34 | compare large multi-line strings against values frozen in golden files
|
20 |
| -* [icmd](http://godoc.org/gotest.tools/icmd) - |
| 35 | +* [icmd](http://gotest.tools/icmd) - |
21 | 36 | execute binaries and test the output
|
22 |
| -* [poll](http://godoc.org/gotest.tools/poll) - |
| 37 | +* [poll](http://gotest.tools/poll) - |
23 | 38 | test asynchronous code by polling until a desired state is reached
|
24 |
| -* [skip](http://godoc.org/gotest.tools/skip) - |
| 39 | +* [skip](http://gotest.tools/skip) - |
25 | 40 | skip a test and print the source code of the condition used to skip the test
|
26 | 41 |
|
27 | 42 | ## Related
|
|
0 commit comments