(t *testing.T, file string)
| 67 | func (e *testExpr) DSL() func() { return e.dsl } |
| 68 | |
| 69 | func relativeToWorkdir(t *testing.T, file string) string { |
| 70 | t.Helper() |
| 71 | |
| 72 | wd, err := os.Getwd() |
| 73 | if err != nil { |
| 74 | t.Fatalf("os.Getwd failed: %v", err) |
| 75 | } |
| 76 | wd, err = filepath.Abs(wd) |
| 77 | if err != nil { |
| 78 | t.Fatalf("filepath.Abs failed: %v", err) |
| 79 | } |
| 80 | rel, err := filepath.Rel(wd, file) |
| 81 | if err != nil { |
| 82 | t.Fatalf("filepath.Rel failed: %v", err) |
| 83 | } |
| 84 | return rel |
| 85 | } |
| 86 | |
| 87 | func itoa(v int) string { |
| 88 | // Avoid pulling fmt/strconv into this focused test. |
no outgoing calls
no test coverage detected