Browse Source

Update go test case and update readme.

Ri Xu 9 years ago
parent
commit
1a2570b873
2 changed files with 6 additions and 8 deletions
  1. 4 8
      README.md
  2. 2 0
      excelize_test.go

+ 4 - 8
README.md

@@ -31,16 +31,12 @@ package main
 import (
     "fmt"
     "os"
-    
+
     "github.com/Luxurioust/excelize"
 )
 
 func main() {
-    xlsx, err := excelize.CreateFile()
-    if err != nil {
-        fmt.Println(err)
-        os.Exit(1)
-    }
+    xlsx := excelize.CreateFile()
     xlsx.NewSheet(2, "Sheet2")
     xlsx.NewSheet(3, "Sheet3")
     xlsx.SetCellInt("Sheet2", "A23", 10)
@@ -63,7 +59,7 @@ package main
 import (
     "fmt"
     "os"
-    
+
     "github.com/Luxurioust/excelize"
 )
 
@@ -95,7 +91,7 @@ package main
 import (
     "fmt"
     "os"
-    
+
     "github.com/Luxurioust/excelize"
 )
 

+ 2 - 0
excelize_test.go

@@ -31,6 +31,8 @@ func TestExcelize(t *testing.T) {
 	f1.SetCellValue("Sheet2", "G1", []byte("World"))
 	f1.SetCellValue("Sheet2", "F2", 42)
 	f1.SetCellValue("Sheet2", "G2", nil)
+	// Test completion column.
+	f1.SetCellValue("Sheet2", "M2", nil)
 	// Test read cell value with given axis large than exists row.
 	f1.GetCellValue("Sheet2", "E13")