diff --git a/internal/gps/_testdata/src/canon_confl/README.md b/internal/gps/_testdata/src/canon_confl/README.md new file mode 100644 index 0000000000..0e22451fb4 --- /dev/null +++ b/internal/gps/_testdata/src/canon_confl/README.md @@ -0,0 +1,3 @@ +The packages inside `vendor/` directoy contain bad go code. This "vendor" +directory exists to avoid its content from being parsed by ListPackages when +running on the whole dep code base. diff --git a/internal/gps/_testdata/src/canon_confl/a.go b/internal/gps/_testdata/src/canon_confl/vendor/canon_confl/a.go similarity index 100% rename from internal/gps/_testdata/src/canon_confl/a.go rename to internal/gps/_testdata/src/canon_confl/vendor/canon_confl/a.go diff --git a/internal/gps/_testdata/src/canon_confl/b.go b/internal/gps/_testdata/src/canon_confl/vendor/canon_confl/b.go similarity index 100% rename from internal/gps/_testdata/src/canon_confl/b.go rename to internal/gps/_testdata/src/canon_confl/vendor/canon_confl/b.go diff --git a/internal/gps/pkgtree/pkgtree_test.go b/internal/gps/pkgtree/pkgtree_test.go index fb1c0e8814..aa634f590c 100644 --- a/internal/gps/pkgtree/pkgtree_test.go +++ b/internal/gps/pkgtree/pkgtree_test.go @@ -1315,7 +1315,7 @@ func TestListPackages(t *testing.T) { }, }, "conflicting canonical comments": { - fileRoot: j("canon_confl"), + fileRoot: j("canon_confl", "vendor", "canon_confl"), importRoot: "canon_confl", out: PackageTree{}, err: &ConflictingImportComments{