...

Text file src/cmd/go/testdata/script/test_json_interleaved.txt

Documentation: cmd/go/testdata/script

     1# Regression test for https://golang.org/issue/40657: output from the main test
     2# function should be attributed correctly even if interleaved with the PAUSE
     3# line for a new parallel subtest.
     4
     5[short] skip
     6
     7go test -json
     8stdout '"Test":"TestWeirdTiming","Output":"[^"]* logging to outer again\\n"'
     9
    10-- go.mod --
    11module example.com
    12go 1.15
    13-- main_test.go --
    14package main
    15
    16import (
    17	"testing"
    18)
    19
    20func TestWeirdTiming(outer *testing.T) {
    21	outer.Run("pauser", func(pauser *testing.T) {
    22		outer.Logf("logging to outer")
    23		pauser.Parallel()
    24	})
    25
    26	outer.Logf("logging to outer again")
    27}

View as plain text