Commits

'Yuk...@gmail.com>'  committed 460d1da

Ignore gotest SKIP

  • Participants
  • Parent commits 7c0492c

Comments (0)

Files changed (3)

File data/gotest.out

 		Some newline goes here
 === RUN TestSubOK
 --- PASS: TestSubOK (0.00 seconds)
+=== RUN TestSubSkip
+--- SKIP: TestSubSkip (0.00 seconds)
 FAIL
 exit status 1
 FAIL	_/home/miki/Projects/goroot/src/xunit	0.004s
 
 	// --- PASS: TestSub (0.00 seconds)
 	// --- FAIL: TestSubFail (0.00 seconds)
-	gt_endRE = "^--- (PASS|FAIL): ([a-zA-Z_][[:word:]]*) \\((\\d+.\\d+)"
+	// --- SKIP: TestSubSkip (0.00 seconds)
+	gt_endRE = "^--- (PASS|FAIL|SKIP): ([a-zA-Z_][[:word:]]*) \\((\\d+.\\d+)"
 
 	// FAIL	_/home/miki/Projects/goroot/src/xunit	0.004s
 	// ok  	_/home/miki/Projects/goroot/src/anotherTest	0.000s
 type Test struct {
 	Name, Time, Message string
 	Failed              bool
+	Skipped              bool
 }
 
 type Suite struct {
 			}
 
 			curTest.Failed = (tokens[1] == "FAIL")
+			curTest.Skipped = (tokens[1] == "SKIP")
 			curTest.Time = tokens[3]
 			curTest.Message = strings.Join(out, "\n")
 			if curSuite == nil {

File go2xunit_test.go

 
 	suite := suites[0]
 	tests := suite.Tests
-	if len(tests) != 4 {
+	if len(tests) != 5 {
 		t.Fatalf("got %d tests instead of 4", len(tests))
 	}