(tsEnv testScriptEnv, command string)
| 248 | } |
| 249 | |
| 250 | func testScriptParamsFor(tsEnv testScriptEnv, command string) testscript.Params { |
| 251 | var files []string |
| 252 | if tsEnv.script != "" { |
| 253 | files = []string{path.Join("testdata", command, tsEnv.script)} |
| 254 | } |
| 255 | |
| 256 | var dir string |
| 257 | if len(files) == 0 { |
| 258 | dir = path.Join("testdata", command) |
| 259 | } |
| 260 | |
| 261 | return testscript.Params{ |
| 262 | Dir: dir, |
| 263 | Files: files, |
| 264 | Setup: sharedSetup(tsEnv), |
| 265 | Cmds: sharedCmds(tsEnv), |
| 266 | RequireExplicitExec: true, |
| 267 | RequireUniqueNames: true, |
| 268 | TestWork: tsEnv.preserveWorkDir, |
| 269 | } |
| 270 | } |
| 271 | |
| 272 | var keyT struct{} |
| 273 |
no test coverage detected