# altering a main() func that actually won't run in testmode. It will need to create a testmain() with the appropriate debug.close() call. This would fail sometimes due to the debug.close() not being called.

go mod tidy

#setenv script_keepwork true
#godebugtester test -work main_test.go main.go
godebugtester test main_test.go main.go
contains stdout "println(3)"
fail contains stdout "println(4)"

-- go.mod --
module mod1
-- main.go --
package main
func main() {
	fa()
	println(4)
}
func fa(){
	println(3)
}
-- main_test.go --
package main
import "testing"
func TestFa(t*testing.T) {
	fa()
}



