make: copy all files found in testdata/

This saves people from needing to updating rxMirrored every time they add a
new type of file to their tests.

Change-Id: I32f87dbe92ae844e411ce77d0abe67c37a668ff3
This commit is contained in:
Bill Thiede 2014-08-15 09:31:40 -07:00
parent e3cdaf4f27
commit 77d36bf198
1 changed files with 3 additions and 1 deletions

View File

@ -515,7 +515,9 @@ func walkDir(src string, opts walkOpts) (maxMod time.Time, err error) {
}
return nil
}
if strings.HasPrefix(base, ".#") || !rxMirrored.MatchString(base) {
dir, _ := filepath.Split(path)
parent := filepath.Base(dir)
if (strings.HasPrefix(base, ".#") || !rxMirrored.MatchString(base)) && parent != "testdata" {
return nil
}
suffix, err := filepath.Rel(src, path)