env GO111MODULE=on
go mod init foo
go test
stdout ^ok\s+foo
env GO111MODULE=off
go test
stdout ^ok\s+
! stdout ^ok\s+(cache)$

-- main_test.go --
package main

import "testing"

func TestF(t *testing.T) {}
