Source file src/cmd/go/internal/verylongtest/script_test.go

     1  // Copyright 2026 The Go Authors. All rights reserved.
     2  // Use of this source code is governed by a BSD-style
     3  // license that can be found in the LICENSE file.
     4  
     5  package verylongtest
     6  
     7  import (
     8  	"cmd/internal/script/scripttest"
     9  	"flag"
    10  	"internal/testenv"
    11  	"testing"
    12  )
    13  
    14  //go:generate go test cmd/go/internal/verylongtest -v -run=TestScript/README --fixreadme
    15  
    16  var fixReadme = flag.Bool("fixreadme", false, "if true, update README for script tests")
    17  
    18  func TestScript(t *testing.T) {
    19  	if testing.Short() {
    20  		// Don't bother setting up the script engine. None of these are short tests.
    21  		t.Skip()
    22  	}
    23  	testenv.MustHaveGoBuild(t)
    24  	testenv.SkipIfShortAndSlow(t)
    25  	scripttest.RunToolScriptTest(t, nil, "testdata/script", *fixReadme)
    26  }
    27  

View as plain text