diff options
| author | xuri <xuri.me@gmail.com> | 2022-11-13 00:40:04 +0800 | 
|---|---|---|
| committer | xuri <xuri.me@gmail.com> | 2022-11-13 00:40:04 +0800 | 
| commit | ac564afa56a691e378ab9bb04cb14bb283886a16 (patch) | |
| tree | def0303fd88e78897a3c739c31c89cff8f492d43 /calcchain_test.go | |
| parent | bd5dd17673f767b9f4643423c77eec486f2ad53f (diff) | |
Remove internal error log print, throw XML deserialize error
Diffstat (limited to 'calcchain_test.go')
| -rw-r--r-- | calcchain_test.go | 7 | 
1 files changed, 7 insertions, 0 deletions
diff --git a/calcchain_test.go b/calcchain_test.go index fae3a51..9eec804 100644 --- a/calcchain_test.go +++ b/calcchain_test.go @@ -33,7 +33,14 @@ func TestDeleteCalcChain(t *testing.T) {  	formulaType, ref := STCellFormulaTypeShared, "C1:C5"  	assert.NoError(t, f.SetCellFormula("Sheet1", "C1", "=A1+B1", FormulaOpts{Ref: &ref, Type: &formulaType})) + +	// Test delete calculation chain with unsupported charset calculation chain.  	f.CalcChain = nil  	f.Pkg.Store(defaultXMLPathCalcChain, MacintoshCyrillicCharset)  	assert.EqualError(t, f.SetCellValue("Sheet1", "C1", true), "XML syntax error on line 1: invalid UTF-8") + +	// Test delete calculation chain with unsupported charset content types. +	f.ContentTypes = nil +	f.Pkg.Store(defaultXMLPathContentTypes, MacintoshCyrillicCharset) +	assert.EqualError(t, f.deleteCalcChain(1, "A1"), "XML syntax error on line 1: invalid UTF-8")  }  | 
