# Ensure that we generate a vendor/modules.txt file even when the only
# requirements in go.mod are unused.  Regression test for
# golang.org/issue/36580

env GO111MODULE=on

go mod vendor
cmp go1.14-modules.txt vendor/modules.txt

-- go.mod --
module example.com/m
go 1.14

require example.com v1.0.0 // indirect
-- go1.14-modules.txt --
# example.com v1.0.0
## explicit
