2016-04-13 23:39:22 +02:00
|
|
|
/** @file
|
2015-01-13 22:55:33 +01:00
|
|
|
* @author Edouard DUPIN
|
|
|
|
* @copyright 2014, Edouard DUPIN, all right reserved
|
2017-01-05 21:28:23 +01:00
|
|
|
* @license MPL v2.0 (see license file)
|
2015-01-13 22:55:33 +01:00
|
|
|
*/
|
|
|
|
|
2016-10-02 15:58:37 +02:00
|
|
|
#include "exmlTestCommon.hpp"
|
2017-09-07 23:38:26 +02:00
|
|
|
#include <etest/etest.hpp>
|
2015-01-13 22:55:33 +01:00
|
|
|
|
|
|
|
|
2016-04-13 23:39:22 +02:00
|
|
|
|
|
|
|
TEST(TestParseDeclaration, testBase) {
|
2015-01-13 22:55:33 +01:00
|
|
|
exmlLocalTest("<?testDeclaration?>\n", "<?testDeclaration?>\n", -1);
|
|
|
|
}
|
2016-04-13 23:39:22 +02:00
|
|
|
TEST(TestParseDeclaration, testAttribute) {
|
2015-01-13 22:55:33 +01:00
|
|
|
exmlLocalTest("<?xml attr=\"plop\"?>\n", "<?xml attr=\"plop\"?>\n", -1);
|
|
|
|
}
|
2016-04-13 23:39:22 +02:00
|
|
|
TEST(TestParseDeclaration, testNoQuote) {
|
2015-01-13 22:55:33 +01:00
|
|
|
exmlLocalTest("<?xml attr=\"plop\"?>\n", "<?xml attr=plop?>\n", -1);
|
|
|
|
}
|
2016-04-13 23:39:22 +02:00
|
|
|
TEST(TestParseDeclaration, testNumberNoQuote) {
|
2015-01-13 22:55:33 +01:00
|
|
|
exmlLocalTest("<?xml attr=\"234345@3452345_.'\"?>\n", "<?xml attr=234345@3452345_.' ?>\n", -1);
|
|
|
|
}
|
2016-04-13 23:39:22 +02:00
|
|
|
TEST(TestParseDeclaration, testSpace1) {
|
2015-01-13 22:55:33 +01:00
|
|
|
exmlLocalTest("<?xml attr=\"plop\"?>\n", "<?xml attr =\"plop\"?>\n", -1);
|
|
|
|
}
|
2016-04-13 23:39:22 +02:00
|
|
|
TEST(TestParseDeclaration, testSpace2) {
|
2015-01-13 22:55:33 +01:00
|
|
|
exmlLocalTest("<?xml attr=\"plop\"?>\n", "<?xml attr= \"plop\"?>\n", -1);
|
|
|
|
}
|
2016-04-13 23:39:22 +02:00
|
|
|
TEST(TestParseDeclaration, testMultiline) {
|
2015-01-13 22:55:33 +01:00
|
|
|
exmlLocalTest("<?xml attr=\"plop\"?>\n", "<?xml attr\n=\n\"plop\"?>\n", -1);
|
|
|
|
}
|
2016-04-13 23:39:22 +02:00
|
|
|
TEST(TestParseDeclaration, testAll) {
|
2015-01-13 22:55:33 +01:00
|
|
|
exmlLocalTest("<?xml attr=\"p65421lop\"?>\n", "<?xml attr \n = \n\t p65421lop?>\n", -1);
|
|
|
|
}
|
|
|
|
|