2019-12-22 00:02:09 +08:00
|
|
|
package excelize
|
|
|
|
|
|
|
|
import "testing"
|
|
|
|
|
|
|
|
func TestCalcChainReader(t *testing.T) {
|
|
|
|
f := NewFile()
|
|
|
|
f.CalcChain = nil
|
2022-01-09 00:20:42 +08:00
|
|
|
f.Pkg.Store(defaultXMLPathCalcChain, MacintoshCyrillicCharset)
|
2019-12-22 00:02:09 +08:00
|
|
|
f.calcChainReader()
|
|
|
|
}
|
|
|
|
|
|
|
|
func TestDeleteCalcChain(t *testing.T) {
|
|
|
|
f := NewFile()
|
|
|
|
f.CalcChain = &xlsxCalcChain{C: []xlsxCalcChainC{}}
|
|
|
|
f.ContentTypes.Overrides = append(f.ContentTypes.Overrides, xlsxOverride{
|
|
|
|
PartName: "/xl/calcChain.xml",
|
|
|
|
})
|
|
|
|
f.deleteCalcChain(1, "A1")
|
|
|
|
}
|