Skip to content

Commit

Permalink
Print version/date of toml-test in result
Browse files Browse the repository at this point in the history
  • Loading branch information
arp242 committed Oct 13, 2023
1 parent 3197926 commit bb159a8
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ For example, to run the tests against the Go TOML library:
% go install github.com/BurntSushi/toml/cmd/toml-test-encoder@master

% toml-test toml-test-decoder
toml-test [toml-test-decoder]: using embeded tests: 278 passed
toml-test v2023-10-23 [toml-test-decoder]: using embeded tests: 278 passed

% toml-test -encoder toml-test-encoder
toml-test [toml-test-encoder]: using embeded tests: 94 passed, 0 failed
toml-test v2023-10-23 [toml-test-encoder]: using embeded tests: 94 passed, 0 failed

The default is to use the tests compiled in the binary; you can use `-testdir`
to load tests from the filesystem. You can use `-run [name]` or `-skip [name]`
Expand Down
3 changes: 2 additions & 1 deletion cmd/toml-test/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -179,7 +179,8 @@ func main() {
}
}

fmt.Printf("toml-test %s: ", cmd)
_, _, date := zli.GetVersion()
fmt.Printf("toml-test v%s %s: ", date.Format("2006-01-02"), cmd)
if testDir == "" {
fmt.Print("using embedded tests")
} else {
Expand Down

0 comments on commit bb159a8

Please sign in to comment.