cmd/go/testdata/script: ensure go test -skip skips ExampleTest1

CL 511837 added a check for go test -skip Example but it currently
doesn't verify that the example doesn't show up in the command output.
Add such a check.

For #61482

Change-Id: I3a8f82fc137739bf291f39bf7719ff92cfc74f9d
Reviewed-on: https://go-review.googlesource.com/c/go/+/519595
Run-TryBot: Tobias Klauser <tobias.klauser@gmail.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Auto-Submit: Tobias Klauser <tobias.klauser@gmail.com>
Reviewed-by: Bryan Mills <bcmills@google.com>
Reviewed-by: Dmitri Shuralyov <dmitshur@google.com>
This commit is contained in:
Tobias Klauser 2023-08-15 15:32:42 +02:00 committed by Gopher Robot
parent 4d2855b55d
commit 9c93ad5520

View file

@ -26,6 +26,7 @@ go test -v -skip Example skip_test.go
stdout RUN.*Test1
stdout RUN.*Test2
stdout RUN.*Test2/3
! stdout ExampleTest1
-- skip_test.go --
package skip_test