Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(575)

Delta Between Two Patch Sets: test/run.go

Issue 5847068: code review 5847068: misc/cgo/stdio: make it work on Windows (Closed)
Left Patch Set: Created 13 years ago
Right Patch Set: diff -r e24d688078cd https://code.google.com/p/go/ Created 12 years, 6 months ago
Left:
Right:
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
Right: Side by side diff | Download
« no previous file with change/comment | « src/run.bat ('k') | no next file » | no next file with change/comment »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
LEFTRIGHT
(no file at all)
1 // skip 1 // skip
2 2
3 // Copyright 2012 The Go Authors. All rights reserved. 3 // Copyright 2012 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style 4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file. 5 // license that can be found in the LICENSE file.
6 6
7 // Run runs tests in the test directory. 7 // Run runs tests in the test directory.
8 //· 8 //·
9 // TODO(bradfitz): docs of some sort, once we figure out how we're changing 9 // TODO(bradfitz): docs of some sort, once we figure out how we're changing
10 // headers of files 10 // headers of files
(...skipping 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 if err != nil { 337 if err != nil {
338 t.err = fmt.Errorf("%s\n%s", err, out) 338 t.err = fmt.Errorf("%s\n%s", err, out)
339 } 339 }
340 340
341 case "run": 341 case "run":
342 useTmp = false 342 useTmp = false
343 out, err := runcmd(append([]string{"go", "run", t.goFileName()}, args...)...) 343 out, err := runcmd(append([]string{"go", "run", t.goFileName()}, args...)...)
344 if err != nil { 344 if err != nil {
345 t.err = fmt.Errorf("%s\n%s", err, out) 345 t.err = fmt.Errorf("%s\n%s", err, out)
346 } 346 }
347 » » if string(out) != t.expectedOutput() { 347 » » if strings.Replace(string(out), "\r\n", "\n", -1) != t.expectedO utput() {
348 t.err = fmt.Errorf("incorrect output\n%s", out) 348 t.err = fmt.Errorf("incorrect output\n%s", out)
349 } 349 }
350 350
351 case "runoutput": 351 case "runoutput":
352 useTmp = false 352 useTmp = false
353 out, err := runcmd("go", "run", t.goFileName()) 353 out, err := runcmd("go", "run", t.goFileName())
354 if err != nil { 354 if err != nil {
355 t.err = fmt.Errorf("%s\n%s", err, out) 355 t.err = fmt.Errorf("%s\n%s", err, out)
356 } 356 }
357 tfile := filepath.Join(t.tempDir, "tmp__.go") 357 tfile := filepath.Join(t.tempDir, "tmp__.go")
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
510 re: regexp.MustCompile(rx), 510 re: regexp.MustCompile(rx),
511 filterRe: regexp.MustCompile(filterPattern), 511 filterRe: regexp.MustCompile(filterPattern),
512 lineNum: lineNum, 512 lineNum: lineNum,
513 file: t.gofile, 513 file: t.gofile,
514 }) 514 })
515 } 515 }
516 } 516 }
517 517
518 return 518 return
519 } 519 }
LEFTRIGHT
« src/run.bat ('k') | no next file » | Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Toggle Comments ('s')

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b