diff options
author | David Tardon <dtardon@redhat.com> | 2016-11-29 15:22:53 +0100 |
---|---|---|
committer | David Tardon <dtardon@redhat.com> | 2016-11-29 16:42:02 +0100 |
commit | 079034b8aa1d4b7bd07a81ef46059cdb6b2f4b38 (patch) | |
tree | 7492f87ff475bbc94d8d483b4a07d28b824c678c /src/test | |
parent | a3cf2c6d02c29e0a69794ead64dd932fa9e3f24b (diff) |
add test for text block with no bg color
Change-Id: Ic6177cbea568c80d93774a95a3704077db42f62f
Diffstat (limited to 'src/test')
-rw-r--r-- | src/test/Makefile.am | 1 | ||||
-rw-r--r-- | src/test/data/no-bgcolor.vsd | bin | 0 -> 39936 bytes | |||
-rw-r--r-- | src/test/importtest.cpp | 8 |
3 files changed, 9 insertions, 0 deletions
diff --git a/src/test/Makefile.am b/src/test/Makefile.am index 48ffaa4..54fbf78 100644 --- a/src/test/Makefile.am +++ b/src/test/Makefile.am @@ -27,6 +27,7 @@ EXTRA_DIST = \ data/fdo86729-utf8.vsd \ data/dwg.vsd \ data/dwg.vsdx \ + data/no-bgcolor.vsd \ $(test_SOURCES) # ImportTest::testVsdMetadataTitleUtf8 checks formatted date string diff --git a/src/test/data/no-bgcolor.vsd b/src/test/data/no-bgcolor.vsd Binary files differnew file mode 100644 index 0000000..1bc9c6c --- /dev/null +++ b/src/test/data/no-bgcolor.vsd diff --git a/src/test/importtest.cpp b/src/test/importtest.cpp index 32fb185..1cbfc9d 100644 --- a/src/test/importtest.cpp +++ b/src/test/importtest.cpp @@ -163,6 +163,7 @@ class ImportTest : public CPPUNIT_NS::TestFixture #if LIBXML_VERSION >= 20902 CPPUNIT_TEST(testVsdxCharBgColor); #endif + CPPUNIT_TEST(testVsdTextBlockWithoutBgColor); CPPUNIT_TEST_SUITE_END(); void testVsdxMetadataTitle(); @@ -172,6 +173,7 @@ class ImportTest : public CPPUNIT_NS::TestFixture void testVsdxUserDefinedMetadata(); void testVsdxImportBgColorFromTheme(); void testVsdxCharBgColor(); + void testVsdTextBlockWithoutBgColor(); xmlBufferPtr m_buffer; xmlDocPtr m_doc; @@ -286,6 +288,12 @@ void ImportTest::testVsdxCharBgColor() assertXPath(m_doc, "/document/page/layer[3]/textObject/paragraph[2]/span", "background-color", "#9dbb61"); } +void ImportTest::testVsdTextBlockWithoutBgColor() +{ + m_doc = parse("no-bgcolor.vsd", m_buffer); + assertXPathNoAttribute(m_doc, "/document/page/layer[5]/textObject/paragraph[1]/span", "background-color"); +} + CPPUNIT_TEST_SUITE_REGISTRATION(ImportTest); /* vim:set shiftwidth=2 softtabstop=2 expandtab: */ |