From 3b913562dd71bec7d9e5bb50c3834ccc8c3dd3f9 Mon Sep 17 00:00:00 2001 From: Shulhan Date: Wed, 7 Feb 2024 13:10:08 +0700 Subject: testing: print the counter if its greater than 1 When test run with "-count=Y" and Y is greater that 1, print a line to indicated the current round of test as "### X/Y". --- src/cmd/go/testdata/script/test_regexps.txt | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/cmd') diff --git a/src/cmd/go/testdata/script/test_regexps.txt b/src/cmd/go/testdata/script/test_regexps.txt index 2f33080a00..b904114a4d 100644 --- a/src/cmd/go/testdata/script/test_regexps.txt +++ b/src/cmd/go/testdata/script/test_regexps.txt @@ -3,16 +3,22 @@ go test -cpu=1 -run=X/Y -bench=X/Y -count=2 -v testregexp # Test the following: # TestX is run, twice +stdout -count=1 '^### 1/2$' stdout -count=2 '^=== RUN TestX$' stdout -count=2 '^ x_test.go:6: LOG: X running$' +stdout -count=1 '^### 2/2$' # TestX/Y is run, twice +stdout -count=1 '^### 1/2$' stdout -count=2 '^=== RUN TestX/Y$' stdout -count=2 '^ x_test.go:8: LOG: Y running$' +stdout -count=1 '^### 2/2$' # TestXX is run, twice +stdout -count=1 '^### 1/2' stdout -count=2 '^=== RUN TestXX$' stdout -count=2 '^ z_test.go:10: LOG: XX running' +stdout -count=1 '^### 2/2' # TestZ is not run ! stdout '^=== RUN TestZ$' -- cgit v1.3