| 1 |
Description: Use parent dir as root rather than searching for .git. |
| 2 |
Author: Lena Voytek <[email protected]> |
| 3 |
Forwarded: not-needed |
| 4 |
Last-Update: 2026-02-21 |
| 5 |
--- |
| 6 |
This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ |
| 7 |
--- a/test/test.go |
| 8 |
+++ b/test/test.go |
| 9 |
@@ -35,24 +35,15 @@ |
| 10 |
"os" |
| 11 |
"path/filepath" |
| 12 |
"runtime" |
| 13 |
+ "strings" |
| 14 |
) |
| 15 |
|
| 16 |
var Update = flag.Bool("update", false, "update .golden files") |
| 17 |
|
| 18 |
func RootDir() string { |
| 19 |
_, filename, _, _ := runtime.Caller(1) |
| 20 |
|
| 21 |
|
| 22 |
|
| 23 |
|
| 24 |
|
| 25 |
|
| 26 |
|
| 27 |
|
| 28 |
|
| 29 |
|
| 30 |
|
| 31 |
|
| 32 |
+ dir := filepath.Dir(filename) + "/" |
| 33 |
+ return dir[:strings.Index(dir, "/go-mysql/")+len("/go-mysql/")] |
| 34 |
} |
| 35 |
|
| 36 |
func fileExists(file string) bool { |