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

Commit

Permalink
Add tests for recursing into dot-go directories
Browse files Browse the repository at this point in the history
  • Loading branch information
ascandella committed May 11, 2017
1 parent 474fb3e commit 78ecf7b
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
3 changes: 3 additions & 0 deletions internal/gps/_testdata/src/dotgodir/foo.go/foo.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package foo

// yes, this is dumb, don't use ".go" in your directory names
19 changes: 18 additions & 1 deletion internal/gps/pkgtree/pkgtree_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1283,7 +1283,24 @@ func TestListPackages(t *testing.T) {
"skip directories starting with '.'": {
fileRoot: j("dotgodir"),
importRoot: "dotgodir",
err: nil,
out: PackageTree{
ImportRoot: "dotgodir",
Packages: map[string]PackageOrErr{
"dotgodir": {
P: Package{
ImportPath: "dotgodir",
Imports: []string{},
},
},
"dotgodir/foo.go": {
P: Package{
ImportPath: "dotgodir/foo.go",
Name: "foo",
Imports: []string{},
},
},
},
},
},
}

Expand Down

0 comments on commit 78ecf7b

Please sign in to comment.