Skip to content
This repository was archived by the owner on Sep 9, 2020. It is now read-only.

Commit 1853dc3

Browse files
author
Vytautas Saltenis
committed
Fix NonCanonicalImportRoot test
1 parent 90d2a5e commit 1853dc3

File tree

1 file changed

+15
-3
lines changed

1 file changed

+15
-3
lines changed

internal/gps/pkgtree/pkgtree_test.go

+15-3
Original file line numberDiff line numberDiff line change
@@ -1332,10 +1332,22 @@ func TestListPackages(t *testing.T) {
13321332
"non-canonical": {
13331333
fileRoot: j("canonical"),
13341334
importRoot: "noncanonical",
1335-
out: PackageTree{},
1336-
err: &NonCanonicalImportRoot{
1335+
out: PackageTree{
13371336
ImportRoot: "noncanonical",
1338-
Canonical: "canonical",
1337+
Packages: map[string]PackageOrErr{
1338+
"noncanonical": PackageOrErr{
1339+
Err: &NonCanonicalImportRoot{
1340+
ImportRoot: "noncanonical",
1341+
Canonical: "canonical",
1342+
},
1343+
},
1344+
"noncanonical/sub": PackageOrErr{
1345+
Err: &NonCanonicalImportRoot{
1346+
ImportRoot: "noncanonical",
1347+
Canonical: "canonical/subpackage",
1348+
},
1349+
},
1350+
},
13391351
},
13401352
},
13411353
}

0 commit comments

Comments
 (0)