MCPcopy
hub / github.com/ddworken/hishtory / RunInteractiveShell

Method RunInteractiveShell

client/testutils.go:36–43  ·  view source on GitHub ↗
(t testing.TB, script string)

Source from the content-addressed store, hash-verified

34type bashTester struct{}
35
36func (b bashTester) RunInteractiveShell(t testing.TB, script string) string {
37 out, err := b.RunInteractiveShellRelaxed(t, "set -emo pipefail\n"+script)
38 if err != nil {
39 _, filename, line, _ := runtime.Caller(1)
40 require.NoError(t, err, fmt.Sprintf("error when running command at %s:%dv", filename, line))
41 }
42 return out
43}
44
45func (b bashTester) RunInteractiveShellRelaxed(t testing.TB, script string) (string, error) {
46 cmd := exec.Command("bash", "-i")

Callers 4

TestStripBashTimePrefixFunction · 0.95
TestFishFunction · 0.95
TestImportHistoryFunction · 0.95
TestBashOrderingBugFunction · 0.95

Calls 1

Tested by 4

TestStripBashTimePrefixFunction · 0.76
TestFishFunction · 0.76
TestImportHistoryFunction · 0.76
TestBashOrderingBugFunction · 0.76