support `garble run`
It's the third time I've wanted it to quickly test out standalone reproducers when people submit bugs. Fixes #661.pull/720/head
parent
d1da066120
commit
cd003eade0
@ -0,0 +1,29 @@
|
||||
garble run garble_main.go
|
||||
! stdout '^garble_main\.go 9$'
|
||||
stdout '\.go \d'
|
||||
|
||||
[short] stop # no need to verify this with -short
|
||||
|
||||
# also with a package
|
||||
garble run .
|
||||
! stdout '^garble_main\.go 9$'
|
||||
stdout '\.go \d'
|
||||
|
||||
go run garble_main.go
|
||||
stdout 'garble_main\.go 9$'
|
||||
-- go.mod --
|
||||
module test/main
|
||||
|
||||
go 1.20
|
||||
-- garble_main.go --
|
||||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"runtime"
|
||||
)
|
||||
|
||||
func main() {
|
||||
_, file, line, _ := runtime.Caller(0)
|
||||
fmt.Println(file, line)
|
||||
}
|
Loading…
Reference in New Issue