-
Notifications
You must be signed in to change notification settings - Fork 118
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #269 from gotestyourself/go1.19
Test against go1.19, remove go1.15
- Loading branch information
Showing
4 changed files
with
25 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,22 @@ | ||
/*Package testjson scans test2json output and builds up a summary of the events. | ||
/* | ||
Package testjson scans test2json output and builds up a summary of the events. | ||
Events are passed to a formatter for output. | ||
Example | ||
# Example | ||
This example reads the test2json output from os.Stdin. It sends every | ||
event to the handler, builds an Execution from the output, then it | ||
prints the number of tests run. | ||
exec, err := testjson.ScanTestOutput(testjson.ScanConfig{ | ||
// Stdout is a reader that provides the test2json output stream. | ||
Stdout: os.Stdin, | ||
// Handler receives TestEvents and error lines. | ||
Handler: eventHandler, | ||
}) | ||
if err != nil { | ||
return fmt.Errorf("failed to scan testjson: %w", err) | ||
} | ||
fmt.Println("Ran %d tests", exec.Total()) | ||
exec, err := testjson.ScanTestOutput(testjson.ScanConfig{ | ||
// Stdout is a reader that provides the test2json output stream. | ||
Stdout: os.Stdin, | ||
// Handler receives TestEvents and error lines. | ||
Handler: eventHandler, | ||
}) | ||
if err != nil { | ||
return fmt.Errorf("failed to scan testjson: %w", err) | ||
} | ||
fmt.Println("Ran %d tests", exec.Total()) | ||
*/ | ||
package testjson // import "gotest.tools/gotestsum/testjson" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters