blob: 60f7e3fa913d9ab7ce0d80551914f3a31ce8ec57 [file] [log] [blame]
# build with no newer version to satisfy exclude
env GO111MODULE=on
! go list -m all
stderr 'no newer version available'
# build with newer version available
cp go.mod2 go.mod
go list -m all
stdout ' v1.5.2'
# build with excluded newer version
cp go.mod3 go.mod
go list -m all
stdout ' v1.5.1'
-- x.go --
package x
import _ ""
-- go.mod --
module x
exclude latest
require latest
-- go.mod2 --
module x
exclude v1.5.1
require v1.5.1
-- go.mod3 --
module x
exclude v1.5.2
require v1.5.1