From 77d36bf1985ea958f44d00b0ce35a77cbe985535 Mon Sep 17 00:00:00 2001 From: Bill Thiede Date: Fri, 15 Aug 2014 09:31:40 -0700 Subject: [PATCH] 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 --- make.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/make.go b/make.go index 0e4c5f82f..bf5547548 100644 --- a/make.go +++ b/make.go @@ -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)