MCPcopy
hub / github.com/lmorg/murex / NewTestProcess

Function NewTestProcess

lang/init.go:110–129  ·  view source on GitHub ↗

NewTestProcess creates a dummy process for testing in Go (ie `go test`)

()

Source from the content-addressed store, hash-verified

108
109// NewTestProcess creates a dummy process for testing in Go (ie `go test`)
110func NewTestProcess() (p *Process) {
111 p = new(Process)
112 p.Stdin = new(null.Null)
113 p.Stdout = new(null.Null)
114 p.Stderr = new(null.Null)
115 p.Config = config.InitConf.Copy()
116 p.Variables = NewVariables(p)
117 p.FileRef = &ref.File{Source: &ref.Source{Module: app.ShellProfile + "/testing"}}
118 p.Context, p.Done = context.WithTimeout(context.Background(), 60*time.Second)
119 p.Parent = ShellProcess
120 p.Scope = ShellProcess
121 p.Next = ShellProcess
122 p.Previous = ShellProcess
123 p.Forks = NewForkManagement()
124 p.SystemProcess = process.NewSystemProcessStruct()
125
126 GlobalFIDs.Register(p)
127
128 return
129}

Callers 15

TestJobsGarbageCollectFunction · 0.92
TestJobsListFunction · 0.92
runTestParseSwitchFunction · 0.92
testParserSymbolFunction · 0.92
testParserObjectFunction · 0.92
testExpressionFunction · 0.92
testParseStatementFunction · 0.92
TestSystemProcessFunction · 0.92
TestCdFunction · 0.92
TestSpellcheckBadBlockFunction · 0.92
RunMethodTestFunction · 0.92

Calls 5

NewSystemProcessStructFunction · 0.92
NewVariablesFunction · 0.85
NewForkManagementFunction · 0.85
CopyMethod · 0.80
RegisterMethod · 0.80

Tested by 15

TestJobsGarbageCollectFunction · 0.74
TestJobsListFunction · 0.74
runTestParseSwitchFunction · 0.74
testParserSymbolFunction · 0.74
testParserObjectFunction · 0.74
testExpressionFunction · 0.74
testParseStatementFunction · 0.74
TestSystemProcessFunction · 0.74
TestCdFunction · 0.74
TestSpellcheckBadBlockFunction · 0.74
TestMarshalFunction · 0.74