summaryrefslogtreecommitdiff
path: root/excelize_test.go
diff options
context:
space:
mode:
authorArtem Kustikov <artem.kustikov@gmail.com>2020-10-04 16:07:39 +0300
committerGitHub <noreply@github.com>2020-10-04 21:07:39 +0800
commitf2b8798a34aab4411a50861a4cdf47203edc3a19 (patch)
tree356fa1ee9d5a1324fdc0cb2111cfdd1b265ed82b /excelize_test.go
parent9055a835a8c77b757e14cde22cc9daa3f9f0c66c (diff)
extend cell value load to support custom datetime format (#703)
* extend cell value load to support custom datetime format * cleanup incorrect imports * fix numeric values conversion as done in legacy Excel * fix tests coverage * revert temporary package name fix * remove personal info from test XLSX files * remove unused dependencies * update format conversion in parseTime * new UT to increase code coverage * Resolve code review issue for PR #703 * Rename broken file name generated by unit test Co-authored-by: xuri <xuri.me@gmail.com>
Diffstat (limited to 'excelize_test.go')
-rw-r--r--excelize_test.go5
1 files changed, 4 insertions, 1 deletions
diff --git a/excelize_test.go b/excelize_test.go
index f1cd652..890bcf6 100644
--- a/excelize_test.go
+++ b/excelize_test.go
@@ -257,7 +257,7 @@ func TestBrokenFile(t *testing.T) {
t.Run("SaveAsEmptyStruct", func(t *testing.T) {
// Test write file with broken file struct with given path.
- assert.NoError(t, f.SaveAs(filepath.Join("test", "BrokenFile.SaveAsEmptyStruct.xlsx")))
+ assert.NoError(t, f.SaveAs(filepath.Join("test", "BadWorkbook.SaveAsEmptyStruct.xlsx")))
})
t.Run("OpenBadWorkbook", func(t *testing.T) {
@@ -1175,6 +1175,9 @@ func TestSetDefaultTimeStyle(t *testing.T) {
f := NewFile()
// Test set default time style on not exists worksheet.
assert.EqualError(t, f.setDefaultTimeStyle("SheetN", "", 0), "sheet SheetN is not exist")
+
+ // Test set default time style on invalid cell
+ assert.EqualError(t, f.setDefaultTimeStyle("Sheet1", "", 42), "cannot convert cell \"\" to coordinates: invalid cell name \"\"")
}
func TestAddVBAProject(t *testing.T) {