0 | |
Description: Modify test fixture paths
|
1 | |
The Debian packging process executes Go tests in a subdirectory
|
2 | |
which is not handled correctly. The path to each test fixture
|
3 | |
file has been updated to reflect this.
|
4 | |
Author: Tim Potter <tpot@hpe.com>
|
5 | |
Forwarded: no
|
6 | |
---
|
7 | |
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
|
8 | |
Index: golang-bindata/convert_test.go
|
9 | |
===================================================================
|
10 | |
--- golang-bindata.orig/convert_test.go
|
11 | |
+++ golang-bindata/convert_test.go
|
12 | |
@@ -19,7 +19,7 @@ func TestFindFiles(t *testing.T) {
|
13 | |
var toc []Asset
|
14 | |
var knownFuncs = make(map[string]int)
|
15 | |
var visitedPaths = make(map[string]bool)
|
16 | |
- err := findFiles("testdata/dupname", "testdata/dupname", true, &toc, []*regexp.Regexp{}, knownFuncs, visitedPaths)
|
17 | |
+ err := findFiles("../../../../../testdata/dupname", "../../../../../testdata/dupname", true, &toc, []*regexp.Regexp{}, knownFuncs, visitedPaths)
|
18 | |
if err != nil {
|
19 | |
t.Errorf("expected to be no error: %+v", err)
|
20 | |
}
|
21 | |
@@ -34,14 +34,14 @@ func TestFindFilesWithSymlinks(t *testin
|
22 | |
|
23 | |
var knownFuncs = make(map[string]int)
|
24 | |
var visitedPaths = make(map[string]bool)
|
25 | |
- err := findFiles("testdata/symlinkSrc", "testdata/symlinkSrc", true, &tocSrc, []*regexp.Regexp{}, knownFuncs, visitedPaths)
|
26 | |
+ err := findFiles("../../../../../testdata/symlinkSrc", "../../../../../testdata/symlinkSrc", true, &tocSrc, []*regexp.Regexp{}, knownFuncs, visitedPaths)
|
27 | |
if err != nil {
|
28 | |
t.Errorf("expected to be no error: %+v", err)
|
29 | |
}
|
30 | |
|
31 | |
knownFuncs = make(map[string]int)
|
32 | |
visitedPaths = make(map[string]bool)
|
33 | |
- err = findFiles("testdata/symlinkParent", "testdata/symlinkParent", true, &tocTarget, []*regexp.Regexp{}, knownFuncs, visitedPaths)
|
34 | |
+ err = findFiles("../../../../../testdata/symlinkParent", "../../../../../testdata/symlinkParent", true, &tocTarget, []*regexp.Regexp{}, knownFuncs, visitedPaths)
|
35 | |
if err != nil {
|
36 | |
t.Errorf("expected to be no error: %+v", err)
|
37 | |
}
|
38 | |
@@ -64,7 +64,7 @@ func TestFindFilesWithRecursiveSymlinks(
|
39 | |
|
40 | |
var knownFuncs = make(map[string]int)
|
41 | |
var visitedPaths = make(map[string]bool)
|
42 | |
- err := findFiles("testdata/symlinkRecursiveParent", "testdata/symlinkRecursiveParent", true, &toc, []*regexp.Regexp{}, knownFuncs, visitedPaths)
|
43 | |
+ err := findFiles("../../../../../testdata/symlinkRecursiveParent", "../../../../../testdata/symlinkRecursiveParent", true, &toc, []*regexp.Regexp{}, knownFuncs, visitedPaths)
|
44 | |
if err != nil {
|
45 | |
t.Errorf("expected to be no error: %+v", err)
|
46 | |
}
|
47 | |
@@ -79,7 +79,7 @@ func TestFindFilesWithSymlinkedFile(t *t
|
48 | |
|
49 | |
var knownFuncs = make(map[string]int)
|
50 | |
var visitedPaths = make(map[string]bool)
|
51 | |
- err := findFiles("testdata/symlinkFile", "testdata/symlinkFile", true, &toc, []*regexp.Regexp{}, knownFuncs, visitedPaths)
|
52 | |
+ err := findFiles("../../../../../testdata/symlinkFile", "../../../../../testdata/symlinkFile", true, &toc, []*regexp.Regexp{}, knownFuncs, visitedPaths)
|
53 | |
if err != nil {
|
54 | |
t.Errorf("expected to be no error: %+v", err)
|
55 | |
}
|