From 329eb3a588e02e6078cb364d20f540072f509f04 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/testing/testing.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/testing/testing.go') diff --git a/src/testing/testing.go b/src/testing/testing.go index 8b7742d85e..add2284edb 100644 --- a/src/testing/testing.go +++ b/src/testing/testing.go @@ -2733,6 +2733,10 @@ func runTests(modulePath, importPath string, matchString func(pat, str string) ( } if Verbose() { t.chatty = newChattyPrinter(t.w) + + if *count > 1 { + fmt.Fprintf(t.w, "### %d/%d\n", i+1, *count) + } } tRunner(t, func(t *T) { for _, test := range tests { -- cgit v1.3