Changeset View
Changeset View
Standalone View
Standalone View
libs/main/tests/documentstructuretest.cpp
Show First 20 Lines • Show All 96 Lines • ▼ Show 20 Line(s) | |||||
97 | 97 | | |||
98 | void DocumentStructureTest::predefinedMetaData() | 98 | void DocumentStructureTest::predefinedMetaData() | ||
99 | { | 99 | { | ||
100 | QString odt = QString(FILES_DATA_DIR) + "/DocumentStructure/predefined.odt"; | 100 | QString odt = QString(FILES_DATA_DIR) + "/DocumentStructure/predefined.odt"; | ||
101 | QVERIFY(QFile(odt).exists()); | 101 | QVERIFY(QFile(odt).exists()); | ||
102 | KoDocumentInfo *documentInfo = loadDocumentInfo(odt); | 102 | KoDocumentInfo *documentInfo = loadDocumentInfo(odt); | ||
103 | QVERIFY(documentInfo); | 103 | QVERIFY(documentInfo); | ||
104 | QString keyword = documentInfo->aboutInfo("keyword"); | 104 | QString keyword = documentInfo->aboutInfo("keyword"); | ||
105 | QStringList keywords = keyword.split(", "); | 105 | QStringList keywords = keyword.split(";"); | ||
106 | QVERIFY(keywords.count() == 3); | 106 | QVERIFY(keywords.count() == 3); | ||
107 | QCOMPARE(keywords[0], QString("First keyword")); | 107 | QCOMPARE(keywords[0], QString("First keyword")); | ||
108 | QCOMPARE(keywords[1], QString("Second keyword")); | 108 | QCOMPARE(keywords[1], QString("Second keyword")); | ||
109 | QCOMPARE(keywords[2], QString("Third keyword")); | 109 | QCOMPARE(keywords[2], QString("Third keyword")); | ||
110 | 110 | | |||
111 | // this is not really the point of this test, but I wrote this already. So... | 111 | // this is not really the point of this test, but I wrote this already. So... | ||
112 | QCOMPARE(documentInfo->aboutInfo("title"), QString("Meta Test Document")); | 112 | QCOMPARE(documentInfo->aboutInfo("title"), QString("Meta Test Document")); | ||
113 | QCOMPARE(documentInfo->aboutInfo("description"), QString("A test document to test meta elements")); | 113 | QCOMPARE(documentInfo->aboutInfo("description"), QString("A test document to test meta elements")); | ||
▲ Show 20 Lines • Show All 41 Lines • Show Last 20 Lines |