xuri
48c16de8bf
- Make variable name more semantic - Reduce cyclomatic complexities for the formula calculate function - Support specified unzip size limit on open file options, avoid zip bombs vulnerability attack - Typo fix for documentation and error message
26 lines
802 B
Go
26 lines
802 B
Go
package excelize
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestNewInvalidColNameError(t *testing.T) {
|
|
assert.EqualError(t, newInvalidColumnNameError("A"), "invalid column name \"A\"")
|
|
assert.EqualError(t, newInvalidColumnNameError(""), "invalid column name \"\"")
|
|
}
|
|
|
|
func TestNewInvalidRowNumberError(t *testing.T) {
|
|
assert.EqualError(t, newInvalidRowNumberError(0), "invalid row number 0")
|
|
}
|
|
|
|
func TestNewInvalidCellNameError(t *testing.T) {
|
|
assert.EqualError(t, newInvalidCellNameError("A"), "invalid cell name \"A\"")
|
|
assert.EqualError(t, newInvalidCellNameError(""), "invalid cell name \"\"")
|
|
}
|
|
|
|
func TestNewInvalidExcelDateError(t *testing.T) {
|
|
assert.EqualError(t, newInvalidExcelDateError(-1), "invalid date value -1.000000, negative values are not supported")
|
|
}
|