Make go2idl handle vendor dirs

This commit is contained in:
Tim Hockin
2016-04-25 11:04:16 -07:00
parent 492aad6de3
commit 92567e1b06
2 changed files with 52 additions and 18 deletions

View File

@@ -18,6 +18,7 @@ package parser_test
import (
"bytes"
"path/filepath"
"reflect"
"testing"
"text/template"
@@ -30,7 +31,7 @@ import (
func construct(t *testing.T, files map[string]string, testNamer namer.Namer) (*parser.Builder, types.Universe, []*types.Type) {
b := parser.New()
for name, src := range files {
if err := b.AddFile(name, []byte(src)); err != nil {
if err := b.AddFile(filepath.Dir(name), name, []byte(src)); err != nil {
t.Fatal(err)
}
}