From b886cd48649c09561417b378b9c1f932d6e72dd8 Mon Sep 17 00:00:00 2001 From: Vincent Richard Date: Thu, 11 Jul 2013 18:06:26 +0200 Subject: Refactored the way embedded objects are referenced in MHTML. --- tests/parser/htmlTextPartTest.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'tests') diff --git a/tests/parser/htmlTextPartTest.cpp b/tests/parser/htmlTextPartTest.cpp index 732fcd8c..0eb7bbaf 100644 --- a/tests/parser/htmlTextPartTest.cpp +++ b/tests/parser/htmlTextPartTest.cpp @@ -157,12 +157,14 @@ VMIME_TEST_SUITE_BEGIN(htmlTextPartTest) obj = htmlPart.findObject("image1@test"); + VASSERT_EQ("ref-type1", vmime::htmlTextPart::embeddedObject::REFERENCED_BY_ID, obj->getReferenceType()); VASSERT_EQ("id-obj1", "image1@test", obj->getId()); VASSERT_EQ("data-obj1", "Image1", extractContent(obj->getData())); VASSERT_EQ("type-obj1", "image/png", obj->getType().generate()); obj = htmlPart.findObject("image2@test"); + VASSERT_EQ("ref-type2", vmime::htmlTextPart::embeddedObject::REFERENCED_BY_ID, obj->getReferenceType()); VASSERT_EQ("id-obj2", "image2@test", obj->getId()); VASSERT_EQ("data-obj2", "Image2", extractContent(obj->getData())); VASSERT_EQ("type-obj2", "image/jpeg", obj->getType().generate()); @@ -223,6 +225,7 @@ VMIME_TEST_SUITE_BEGIN(htmlTextPartTest) obj = htmlPart.findObject("http://www.vmime.org/test/image1.png"); + VASSERT_EQ("ref-type", vmime::htmlTextPart::embeddedObject::REFERENCED_BY_LOCATION, obj->getReferenceType()); VASSERT_EQ("id-obj", "http://www.vmime.org/test/image1.png", obj->getId()); VASSERT_EQ("data-obj", "Image1", extractContent(obj->getData())); VASSERT_EQ("type-obj", "image/png", obj->getType().generate()); -- cgit v1.2.3