From 04e8beed324cc08c5172cbab711f37d74265fd7b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Mart=C3=AD?= Date: Tue, 9 Jun 2020 17:47:16 +0100 Subject: [PATCH] testdata: add sections to scripts/test.txt --- testdata/scripts/test.txt | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/testdata/scripts/test.txt b/testdata/scripts/test.txt index 16cb5e8..2459afa 100644 --- a/testdata/scripts/test.txt +++ b/testdata/scripts/test.txt @@ -1,13 +1,16 @@ +# build the test binary garble test -c binsubstr bar.test$exe 'TestFoo' 'TestSeparateFoo' ! binsubstr bar.test$exe 'ImportedVar' +# run the tests exec ./bar.test -test.v stdout 'PASS.*TestFoo' stdout 'PASS.*TestSeparateFoo' [short] stop # no need to verify this with -short +# verify with regular cmd/go exec go test -v stdout 'PASS.*TestFoo' @@ -22,9 +25,7 @@ var ImportedVar = "imported var value" -- bar_test.go -- package bar -import ( - "testing" -) +import "testing" func TestFoo(t *testing.T) { t.Log(ImportedVar)