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/cgo.txt

38 lines
508 B
Plaintext

env GOPRIVATE=test/main
garble build
exec ./main
cmp stderr main.stderr
binsubstr main$exe 'privateAdd'
[short] stop # no need to verify this with -short
garble -tiny build
exec ./main
cmp stderr main.stderr
binsubstr main$exe 'privateAdd'
go build
exec ./main
cmp stderr main.stderr
-- go.mod --
module test/main
go 1.15
-- main.go --
package main
/*
static int privateAdd(int a, int b) {
return a + b;
}
*/
import "C"
func main() {
println(C.privateAdd(C.int(1), C.int(2)))
}
-- main.stderr --
3