diff options
Diffstat (limited to 'src/cmd/go/testdata/script/mod_load_replace_mismatch.txt')
-rw-r--r-- | src/cmd/go/testdata/script/mod_load_replace_mismatch.txt | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/cmd/go/testdata/script/mod_load_replace_mismatch.txt b/src/cmd/go/testdata/script/mod_load_replace_mismatch.txt new file mode 100644 index 0000000000..74dbb34b8a --- /dev/null +++ b/src/cmd/go/testdata/script/mod_load_replace_mismatch.txt @@ -0,0 +1,23 @@ +# If a replacement module declares a module path different from both +# the original module and its location, report an error with all three paths. +# In particular, the "required as" path should be the original. +# Verifies golang.org/issue/38220. +! go list . +cmp stderr want + +-- go.mod -- +module m + +require rsc.io/quote v1.5.2 + +replace rsc.io/quote v1.5.2 => example.com/quote v1.5.2 + +-- use.go -- +package use + +import _ "rsc.io/quote" + +-- want -- +go: example.com/quote@v1.5.2: parsing go.mod: + module declares its path as: rsc.io/Quote + but was required as: rsc.io/quote |