You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
README: add context on maintainers and a testscript overview with links (rogpeppe#225)
Help give some context for people who might be evaluating using this repo and are wondering:
* what is the bus factor for the repo?
* who are the maintainers?
* are the maintainer(s) of this repo still interested in this repo (including, are they still using it)?
* are other people using testscript?
* where did testscript come from?
Obviously, someone can hunt around to determine many of these things on their own,
but the intent is to help make that process more efficient.
Updates rogpeppe#196.
Copy file name to clipboardExpand all lines: README.md
+27-2Lines changed: 27 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,15 @@
1
1
This repository factors out an opinionated selection of internal packages and functionality from the Go standard
2
2
library. Currently this consists mostly of packages and testing code from within the Go tool implementation.
3
3
4
+
This repo is [primarily maintained](https://github.com/rogpeppe/go-internal/graphs/contributors) by long-time
5
+
[Go contributors](https://github.com/golang/go/contributors) who are also currently
6
+
[maintaining CUE](https://github.com/cue-lang/cue/graphs/contributors) (which is primarily written in Go
7
+
and which relies upon several of the packages here).
8
+
9
+
Contributions are welcome, but please open an issue for discussion first.
10
+
11
+
## Packages
12
+
4
13
Included are the following:
5
14
6
15
- dirhash: calculate hashes over directory trees the same way that the Go tool does.
@@ -15,6 +24,22 @@ Included are the following:
15
24
- testscript: script-based testing based on txtar files
16
25
- txtar: simple text-based file archives for testing.
17
26
18
-
#Links
27
+
### testscript
19
28
20
-
-[Test scripts in Go](https://bitfieldconsulting.com/golang/test-scripts)
29
+
The most popular package here is the [testscript](https://pkg.go.dev/github.com/rogpeppe/go-internal/testscript) package:
30
+
* Provides a shell-like test environment that is very nicely tuned for testing Go CLI commands.
31
+
* Extracted from the core Go team's internal testscript package ([cmd/go/internal/script](https://github.com/golang/go/tree/master/src/cmd/go/internal/script)),
32
+
which is [heavily used](https://github.com/golang/go/tree/master/src/cmd/go/testdata/script) to test the `go` command.
33
+
* Supports patterns for checking stderr/stdout, command pass/fail assertions, and so on.
34
+
* Integrates well with `go test`, including coverage support.
35
+
* Inputs and sample output files can use the simple [txtar](https://pkg.go.dev/golang.org/x/tools/txtar)
36
+
text archive format, also used by the Go playground.
0 commit comments