Browse Source

Merge wpsBlankLine into compatibility_test.go

Geoffrey J. Teale 11 years ago
parent
commit
faaaf6b281
2 changed files with 31 additions and 36 deletions
  1. 31 0
      compatibility_test.go
  2. 0 36
      wpsBlankLine_test.go

+ 31 - 0
compatibility_test.go

@@ -45,3 +45,34 @@ func (m *MacNumbersSuite) TestMacNumbers(c *C) {
 	s := sheet.Cell(0, 0).String()
 	s := sheet.Cell(0, 0).String()
 	c.Assert(s, Equals, "编号")
 	c.Assert(s, Equals, "编号")
 }
 }
+
+type WpsBlankLineSuite struct{}
+
+var _ = Suite(&WorksheetSuite{})
+
+// Test that we can successfully read an XLSX file generated by
+// Wps on windows. you can download it freely from http://www.wps.cn/
+func (w *WpsBlankLineSuite) TestWpsBlankLine(c *C) {
+	xlsxFile, err := OpenFile("./testdocs/wpsBlankLineTest.xlsx")
+	c.Assert(err, IsNil)
+	c.Assert(xlsxFile, NotNil)
+	sheet := xlsxFile.Sheet["Sheet1"]
+	row := sheet.Rows[0]
+	cell := row.Cells[0]
+	s := cell.String()
+	expected := "编号"
+	c.Assert(s, Equals, expected)
+
+	row = sheet.Rows[2]
+	cell = row.Cells[0]
+	s = cell.String()
+	c.Assert(s, Equals, expected)
+
+	row = sheet.Rows[4]
+	cell = row.Cells[1]
+	s = cell.String()
+	c.Assert(s, Equals, "")
+
+	s = sheet.Rows[4].Cells[2].String()
+	c.Assert(s, Equals, expected)
+}

+ 0 - 36
wpsBlankLine_test.go

@@ -1,36 +0,0 @@
-package xlsx
-
-import (
-	. "gopkg.in/check.v1"
-)
-
-type WpsBlankLineSuite struct{}
-
-var _ = Suite(&WorksheetSuite{})
-
-// Test that we can successfully read an XLSX file generated by
-// Wps on windows. you can download it freely from http://www.wps.cn/
-func (w *WpsBlankLineSuite) TestWpsBlankLine(c *C) {
-	xlsxFile, err := OpenFile("./testdocs/wpsBlankLineTest.xlsx")
-	c.Assert(err, IsNil)
-	c.Assert(xlsxFile, NotNil)
-	sheet := xlsxFile.Sheet["Sheet1"]
-	row := sheet.Rows[0]
-	cell := row.Cells[0]
-	s := cell.String()
-	expected := "编号"
-	c.Assert(s, Equals, expected)
-
-	row = sheet.Rows[2]
-	cell = row.Cells[0]
-	s = cell.String()
-	c.Assert(s, Equals, expected)
-
-	row = sheet.Rows[4]
-	cell = row.Cells[1]
-	s = cell.String()
-	c.Assert(s, Equals, "")
-
-	s = sheet.Rows[4].Cells[2].String()
-	c.Assert(s, Equals, expected)
-}