1▶package main
2
3import (
· · ·
14)
15
16▶const sccTestFlag string = "-test.main"
17
18var sccBinPath = os.Args[0]
· · ·
19
20▶func TestMain(m *testing.M) {
21 idx := slices.Index(os.Args, sccTestFlag)
22 if idx != -1 {
· · ·
23 os.Args = slices.Delete(os.Args, idx, idx+1)
24▶ main()
25 return
26 }
· · ·
29}
30
31▶func runSCC(args ...string) (string, error) {
32 args = slices.Insert(args, 0, sccTestFlag)
33 cmd := exec.Command(sccBinPath, args...)
+ 41 more matches in this file