Przeglądaj źródła

Merge pull request #22 from bronze1man/pr-mac-numbers-test

the missing mac's Numbers xlsx file
Geoffrey J. Teale 12 lat temu
rodzic
commit
c3fdbf9c5e
2 zmienionych plików z 24 dodań i 0 usunięć
  1. BIN
      macNumbersTest.xlsx
  2. 24 0
      macNumbers_test.go

BIN
macNumbersTest.xlsx


+ 24 - 0
macNumbers_test.go

@@ -0,0 +1,24 @@
+package xlsx
+
+import (
+	"testing"
+)
+
+// Test that we can successfully read an XLSX file generated by
+// Numbers for Mac.
+func TestMacNumbers(t *testing.T) {
+	xlsxFile, error := OpenFile("MacNumbersTest.xlsx")
+	if error != nil {
+		t.Error(error.Error())
+		return
+	}
+	if xlsxFile == nil {
+		t.Error("OpenFile returned nil FileInterface without generating an os.Error")
+		return
+	}
+	s := xlsxFile.Sheets[0].Cell(0, 0).String()
+	if s != "编号" {
+		t.Errorf("[TestMacExcel] xlsxFile.Sheets[0].Cell(0,0).String():'%s'", s)
+		return
+	}
+}