Skip to content

Commit

Permalink
Some possible new names for the formats
Browse files Browse the repository at this point in the history
  • Loading branch information
dnephin committed Feb 20, 2020
1 parent 27ee001 commit 3dcb1ca
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
8 changes: 4 additions & 4 deletions README.md
Expand Up @@ -11,7 +11,7 @@ does not support modules).
## Demo
A demonstration of three `--format` options.

![Demo](https://i.ibb.co/jrxyrcQ/demo.gif)
![Demo](https://i.ibb.co/XZfhmXq/demo.gif)
<br />[Source](https://github.com/gotestyourself/gotestsum/tree/readme-demo/scripts)

## Docs
Expand Down Expand Up @@ -42,9 +42,9 @@ gotestsum --format short-verbose

Supported formats:
* `dots` - print a character for each test.
* `short` (default) - print a line for each package.
* `short-with-failures` - print a line for each package and failed test output.
* `short-verbose` - print a line for each test and package.
* `pkgname` (default) - print a line for each package.
* `pkgname-and-test-fails` - print a line for each package, and failed test output.
* `testname` - print a line for each test and package.
* `standard-quiet` - the standard `go test` format.
* `standard-verbose` - the standard `go test -v` format.

Expand Down
12 changes: 6 additions & 6 deletions main.go
Expand Up @@ -65,12 +65,12 @@ Flags:
flags.PrintDefaults()
fmt.Fprint(os.Stderr, `
Formats:
dots print a character for each test
short print a line for each package
short-with-failures print a line for each package and failed test output
short-verbose print a line for each test and package
standard-quiet standard go test format
standard-verbose standard go test -v format
dots print a character for each test
pkgname print a line for each package
pkgname-and-test-fails print a line for each package and failed test output
testname print a line for each test and package
standard-quiet standard go test format
standard-verbose standard go test -v format
`)
}
flags.BoolVar(&opts.debug, "debug", false, "enabled debug")
Expand Down
6 changes: 3 additions & 3 deletions testjson/format.go
Expand Up @@ -200,11 +200,11 @@ func NewEventFormatter(out io.Writer, format string) EventFormatter {
return &formatAdapter{out, standardQuietFormat}
case "dots":
return newDotFormatter(out)
case "short-verbose":
case "testname", "short-verbose":
return &formatAdapter{out, shortVerboseFormat}
case "short":
case "pkgname", "short":
return &formatAdapter{out, shortFormat}
case "short-with-failures":
case "pkgname-and-test-fails", "short-with-failures":
return &formatAdapter{out, shortWithFailuresFormat}
default:
return nil
Expand Down

0 comments on commit 3dcb1ca

Please sign in to comment.