From 3dcb1ca072f1f117f3d877c8042f7527e18eff42 Mon Sep 17 00:00:00 2001 From: Daniel Nephin Date: Mon, 3 Feb 2020 01:24:56 -0500 Subject: [PATCH] Some possible new names for the formats --- README.md | 8 ++++---- main.go | 12 ++++++------ testjson/format.go | 6 +++--- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index d26c0a8c..31175ee8 100644 --- a/README.md +++ b/README.md @@ -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)
[Source](https://github.com/gotestyourself/gotestsum/tree/readme-demo/scripts) ## Docs @@ -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. diff --git a/main.go b/main.go index 615a4bba..a59fd99d 100644 --- a/main.go +++ b/main.go @@ -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") diff --git a/testjson/format.go b/testjson/format.go index 7625b344..992c804f 100644 --- a/testjson/format.go +++ b/testjson/format.go @@ -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