testdata: add sections to scripts/test.txt

pull/31/head
Daniel Martí 5 years ago
parent c6643d37f9
commit 04e8beed32

@ -1,13 +1,16 @@
# build the test binary
garble test -c garble test -c
binsubstr bar.test$exe 'TestFoo' 'TestSeparateFoo' binsubstr bar.test$exe 'TestFoo' 'TestSeparateFoo'
! binsubstr bar.test$exe 'ImportedVar' ! binsubstr bar.test$exe 'ImportedVar'
# run the tests
exec ./bar.test -test.v exec ./bar.test -test.v
stdout 'PASS.*TestFoo' stdout 'PASS.*TestFoo'
stdout 'PASS.*TestSeparateFoo' stdout 'PASS.*TestSeparateFoo'
[short] stop # no need to verify this with -short [short] stop # no need to verify this with -short
# verify with regular cmd/go
exec go test -v exec go test -v
stdout 'PASS.*TestFoo' stdout 'PASS.*TestFoo'
@ -22,9 +25,7 @@ var ImportedVar = "imported var value"
-- bar_test.go -- -- bar_test.go --
package bar package bar
import ( import "testing"
"testing"
)
func TestFoo(t *testing.T) { func TestFoo(t *testing.T) {
t.Log(ImportedVar) t.Log(ImportedVar)

Loading…
Cancel
Save