You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
garble/testdata/scripts/imports.txt

41 lines
690 B
Plaintext

garble build
exec ./main
cmp stdout main.stdout
! bingrep main$exe 'ImportedVar' 'ImportedConst' 'ImportedFunc' 'ImportedType'
-- go.mod --
module foo.com/main
-- main.go --
package main
import (
"fmt"
"foo.com/main/imported"
)
func main() {
fmt.Println(imported.ImportedVar)
fmt.Println(imported.ImportedConst)
imported.ImportedFunc('x')
fmt.Println(imported.ImportedType(3))
fmt.Println(nil)
}
-- main.stdout --
imported var value
imported const value
3
<nil>
-- imported/imported.go --
package imported
var ImportedVar = "imported var value"
const ImportedConst = "imported const value"
func ImportedFunc(param rune) string {
return string(param)
}
type ImportedType int