Files
garble/testdata/scripts/cgo.txt
Andrew LeFevre d679944408 Strip all filename and position info when -tiny is passed (#128)
Co-authored-by: pagran <pagran@protonmail.com>
Co-authored-by: lu4p <lu4p@pm.me>
2020-09-07 17:24:40 +02:00

36 lines
499 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
-- 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