Add test case for auto detect of apng from png failing

This commit is contained in:
Skye Deving 2021-01-07 03:57:04 -06:00
parent 9363246ca1
commit 517ebdf247

View File

@ -36,4 +36,11 @@ TEST_CASE("Detect png animation", "[apng][noci]") {
REQUIRE(!p.supportsAnimation()); REQUIRE(!p.supportsAnimation());
p.setFormat("png"); p.setFormat("png");
REQUIRE(!QPixmap::fromImage(p.read()).isNull()); REQUIRE(!QPixmap::fromImage(p.read()).isNull());
// Auto detect fails
QImageReader d;
d.setAutoDetectImageFormat(true);
d.setFileName("snackoo.png");
REQUIRE(!d.supportsAnimation());
REQUIRE(!QPixmap::fromImage(d.read()).isNull());
} }