diff --git a/cmd/toml-test/main.go b/cmd/toml-test/main.go index 1fa7b57..fbb25ed 100644 --- a/cmd/toml-test/main.go +++ b/cmd/toml-test/main.go @@ -209,14 +209,14 @@ func main() { fmt.Printf(", %2d skipped", tests.Skipped) } if printSkip && (tests.FailedValid > 0 || tests.FailedInvalid > 0) { - fmt.Print("\n\n #!/usr/bin/env bash\n skip=(\n") + fmt.Print("\n\n #!/usr/bin/env bash\n # Also compatible with zsh.\n skip=(\n") for _, f := range tests.Tests { if f.Failed() { fmt.Printf(" -skip '%s'\n", f.Path) } } fmt.Println(" )") - fmt.Print(" toml-test $skip[@] " + strings.Join(cmd, " ")) + fmt.Print(" toml-test ${skip[@]} " + strings.Join(cmd, " ")) if runner.Encoder { fmt.Print(" -encoder") } diff --git a/cmd/toml-test/usage.go b/cmd/toml-test/usage.go index bba4d99..fc3f5e2 100644 --- a/cmd/toml-test/usage.go +++ b/cmd/toml-test/usage.go @@ -99,9 +99,9 @@ Flags: -parallel Number of tests to run in parallel; defaults to GOMAXPROCS, normally the number of cores available. - -print-skip Print a small bash script with -skip flag for failing tests; - useful to get a list of "known failures" for CI integrations - and such. + -print-skip Print a small bash/zsh script with -skip flag for failing + tests; useful to get a list of "known failures" for CI + integrations and such. -int-as-float Treat all integers as floats, rather than integers. This also skips the int64 test as that's outside of the safe float diff --git a/tests/valid/spec/string-6.json b/tests/valid/spec/string-6.json index be206e9..526d1e1 100644 --- a/tests/valid/spec/string-6.json +++ b/tests/valid/spec/string-6.json @@ -1,7 +1,4 @@ { - "regex2": {"type": "string", "value": "I [dw]on't need \\d{2} apples"}, - "lines": { - "type": "string", - "value": "The first newline is\ntrimmed in raw strings.\n All other whitespace\n is preserved.\n" - } + "lines": {"type": "string", "value": "The first newline is\ntrimmed in raw strings.\n All other whitespace\n is preserved.\n"}, + "regex2": {"type": "string", "value": "I [dw]on't need \\d{2} apples"} }