script_test.go (go1.19.src) | : | script_test.go (go1.19.1.src) | ||
---|---|---|---|---|
skipping to change at line 559 | skipping to change at line 559 | |||
ts.check(os.WriteFile(file, bytes.ReplaceAll(data, []byte("\n"), []byte("\r\n")), 0666)) | ts.check(os.WriteFile(file, bytes.ReplaceAll(data, []byte("\n"), []byte("\r\n")), 0666)) | |||
} | } | |||
} | } | |||
// cc runs the C compiler along with platform specific options. | // cc runs the C compiler along with platform specific options. | |||
func (ts *testScript) cmdCc(want simpleStatus, args []string) { | func (ts *testScript) cmdCc(want simpleStatus, args []string) { | |||
if len(args) < 1 || (len(args) == 1 && args[0] == "&") { | if len(args) < 1 || (len(args) == 1 && args[0] == "&") { | |||
ts.fatalf("usage: cc args... [&]") | ts.fatalf("usage: cc args... [&]") | |||
} | } | |||
var b work.Builder | b := work.NewBuilder(ts.workdir) | |||
b.Init() | ||||
ts.cmdExec(want, append(b.GccCmd(".", ""), args...)) | ts.cmdExec(want, append(b.GccCmd(".", ""), args...)) | |||
robustio.RemoveAll(b.WorkDir) | ||||
} | } | |||
// cd changes to a different directory. | // cd changes to a different directory. | |||
func (ts *testScript) cmdCd(want simpleStatus, args []string) { | func (ts *testScript) cmdCd(want simpleStatus, args []string) { | |||
if want != success { | if want != success { | |||
ts.fatalf("unsupported: %v cd", want) | ts.fatalf("unsupported: %v cd", want) | |||
} | } | |||
if len(args) != 1 { | if len(args) != 1 { | |||
ts.fatalf("usage: cd dir") | ts.fatalf("usage: cd dir") | |||
} | } | |||
End of changes. 2 change blocks. | ||||
3 lines changed or deleted | 1 lines changed or added |