|
|
@ -98,8 +98,12 @@ func TestAddPictureErrors(t *testing.T) {
|
|
|
|
decodeConfig := func(r io.Reader) (image.Config, error) { return image.Config{Height: 100, Width: 90}, nil }
|
|
|
|
decodeConfig := func(r io.Reader) (image.Config, error) { return image.Config{Height: 100, Width: 90}, nil }
|
|
|
|
image.RegisterFormat("emf", "", decode, decodeConfig)
|
|
|
|
image.RegisterFormat("emf", "", decode, decodeConfig)
|
|
|
|
image.RegisterFormat("wmf", "", decode, decodeConfig)
|
|
|
|
image.RegisterFormat("wmf", "", decode, decodeConfig)
|
|
|
|
|
|
|
|
image.RegisterFormat("emz", "", decode, decodeConfig)
|
|
|
|
|
|
|
|
image.RegisterFormat("wmz", "", decode, decodeConfig)
|
|
|
|
assert.NoError(t, f.AddPicture("Sheet1", "Q1", filepath.Join("test", "images", "excel.emf"), ""))
|
|
|
|
assert.NoError(t, f.AddPicture("Sheet1", "Q1", filepath.Join("test", "images", "excel.emf"), ""))
|
|
|
|
assert.NoError(t, f.AddPicture("Sheet1", "Q7", filepath.Join("test", "images", "excel.wmf"), ""))
|
|
|
|
assert.NoError(t, f.AddPicture("Sheet1", "Q7", filepath.Join("test", "images", "excel.wmf"), ""))
|
|
|
|
|
|
|
|
assert.NoError(t, f.AddPicture("Sheet1", "Q13", filepath.Join("test", "images", "excel.emz"), ""))
|
|
|
|
|
|
|
|
assert.NoError(t, f.AddPicture("Sheet1", "Q19", filepath.Join("test", "images", "excel.wmz"), ""))
|
|
|
|
assert.NoError(t, f.SaveAs(filepath.Join("test", "TestAddPicture2.xlsx")))
|
|
|
|
assert.NoError(t, f.SaveAs(filepath.Join("test", "TestAddPicture2.xlsx")))
|
|
|
|
assert.NoError(t, f.Close())
|
|
|
|
assert.NoError(t, f.Close())
|
|
|
|
}
|
|
|
|
}
|
|
|
|