Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions gotooltest/testdata/cover.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
unquote scripts/exec.txt

[darwin] skip 'Pending a fix for github.com/rogpeppe/go-internal/issues/130'

# The module uses testscript itself.
# Use the checked out module, based on where the test binary ran.
go mod edit -replace=github.com/rogpeppe/go-internal=${GOINTERNAL_MODULE}
Expand All @@ -10,18 +8,17 @@ go mod tidy
# First, a 'go test' run without coverage.
go test -vet=off
stdout 'PASS'
! stdout 'total coverage'
! stdout 'coverage'

# Then, a 'go test' run with -coverprofile.
# Assuming testscript works well, this results in the basic coverage being 0%,
# since the test binary does not directly run any non-test code.
# The total coverage after merging profiles should end up being 100%,
# as long as all three sub-profiles are accounted for.
# The total coverage after merging profiles should end up being 100%.
# Marking all printlns as covered requires all edge cases to work well.
# Go 1.20 learned to produce and merge multiple coverage profiles,
# so versions before then report a shallow 0% coverage.
go test -vet=off -coverprofile=cover.out -v
stdout 'PASS'
stdout '^coverage: 0\.0%'
stdout '^total coverage: 100\.0%'
[go1.20] stdout 'coverage: 100\.0%'
[!go1.20] stdout 'coverage: 0\.0%'
! stdout 'malformed coverage' # written by "go test" if cover.out is invalid
exists cover.out

Expand Down
280 changes: 0 additions & 280 deletions testscript/cover.go

This file was deleted.

Loading