Source file test/fixedbugs/issue9862_run.go

     1  // run
     2  
     3  //go:build !nacl && !js && !wasip1 && gc
     4  
     5  // Copyright 2015 The Go Authors. All rights reserved.
     6  // Use of this source code is governed by a BSD-style
     7  // license that can be found in the LICENSE file.
     8  
     9  // Check for compile or link error.
    10  
    11  package main
    12  
    13  import (
    14  	"os/exec"
    15  	"strings"
    16  )
    17  
    18  func main() {
    19  	out, err := exec.Command("go", "run", "fixedbugs/issue9862.go").CombinedOutput()
    20  	outstr := string(out)
    21  	if err == nil {
    22  		println("go run issue9862.go succeeded, should have failed\n", outstr)
    23  		return
    24  	}
    25  	if !strings.Contains(outstr, "symbol too large") {
    26  		println("go run issue9862.go gave unexpected error; want symbol too large:\n", outstr)
    27  	}
    28  }
    29  

View as plain text