@@ -27,7 +27,7 @@ func parseFlags() (tomltest.Runner, []string, int, string, bool, bool, bool) {
27
27
var (
28
28
help = f .Bool (false , "help" , "h" )
29
29
versionFlag = f .IntCounter (0 , "version" , "V" )
30
- tomlVersion = f .String ("1.0.0" , "toml" )
30
+ tomlVersion = f .String (tomltest . DefaultVersion , "toml" )
31
31
encoder = f .Bool (false , "encoder" )
32
32
testDir = f .String ("" , "testdir" )
33
33
showAll = f .IntCounter (0 , "v" )
@@ -49,6 +49,9 @@ func parseFlags() (tomltest.Runner, []string, int, string, bool, bool, bool) {
49
49
fmt .Printf (usage , filepath .Base (os .Args [0 ]))
50
50
zli .Exit (0 )
51
51
}
52
+ if tomlVersion .String () == "latest" {
53
+ * tomlVersion .Pointer () = tomltest .DefaultVersion
54
+ }
52
55
if versionFlag .Int () > 0 {
53
56
zli .PrintVersion (versionFlag .Int () > 1 )
54
57
zli .Exit (0 )
@@ -209,6 +212,7 @@ func main() {
209
212
if tests .Skipped > 0 {
210
213
fmt .Printf (", %2d skipped" , tests .Skipped )
211
214
}
215
+
212
216
if printSkip && (tests .FailedValid > 0 || tests .FailedInvalid > 0 ) {
213
217
fmt .Print ("\n \n #!/usr/bin/env bash\n # Also compatible with zsh.\n skip=(\n " )
214
218
for _ , f := range tests .Tests {
@@ -332,7 +336,7 @@ func doCat(fsys fs.FS, tomlVersion string, size int, run, skip []string) {
332
336
f , err := fs .ReadFile (fsys , "files-toml-" + tomlVersion )
333
337
zli .F (err )
334
338
335
- var useFiles = make ([]string , 0 , 8 )
339
+ useFiles : = make ([]string , 0 , 8 )
336
340
outer1:
337
341
for _ , line := range strings .Split (string (f ), "\n " ) {
338
342
if strings .HasPrefix (line , "valid/" ) && strings .HasSuffix (line , ".toml" ) {
0 commit comments