(m *testing.M)
| 17 | ) |
| 18 | |
| 19 | func Main(m *testing.M) { |
| 20 | commands := map[string]func(){ |
| 21 | "devbox": func() { |
| 22 | // Call the devbox CLI directly: |
| 23 | os.Exit(boxcli.Execute(context.Background(), os.Args[1:])) |
| 24 | }, |
| 25 | "print": func() { // Not 'echo' because we don't expand variables |
| 26 | fmt.Println(strings.Join(os.Args[1:], " ")) |
| 27 | }, |
| 28 | } |
| 29 | testscript.Main(m, commands) |
| 30 | } |
| 31 | |
| 32 | func RunTestscripts(t *testing.T, testscriptsDir string) { |
| 33 | globPattern := filepath.Join(testscriptsDir, "**/*.test.txt") |