diff options
author | Ivan Zhakov <ivan@apache.org> | 2019-05-12 15:05:31 +0000 |
---|---|---|
committer | Ivan Zhakov <ivan@apache.org> | 2019-05-12 15:05:31 +0000 |
commit | f7c270db1d27febcb110a2b383568cbef9e18de2 (patch) | |
tree | bce98ce45e5048561d654afff6b48ec78ed363c7 /test | |
parent | d6e2bf325ad0d02849701289e92171715150e6ee (diff) | |
download | apr-f7c270db1d27febcb110a2b383568cbef9e18de2.tar.gz |
Add more XML tests.
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@1859153 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r-- | test/testxml.c | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/testxml.c b/test/testxml.c index d676a1335..9a376ca7b 100644 --- a/test/testxml.c +++ b/test/testxml.c @@ -238,6 +238,40 @@ static void test_xml_roundtrip(abts_case *tc, void *data) "aa<ns1:q/>" "</ns2:test>", __LINE__); + + roundtrip(tc, + "<test>" + "<sender>John Smith</sender>" + "</test>", + "<test xmlns:ns0=\"DAV:\">" + "<sender>John Smith</sender>" + "</test>", + __LINE__); + + roundtrip(tc, + "<test>" + "<![CDATA[<sender>John Smith</sender>]]>" + "</test>", + "<test xmlns:ns0=\"DAV:\">" + "<sender>John Smith</sender>" + "</test>", + __LINE__); + + roundtrip(tc, + "<elem> abc def </elem>", + "<elem xmlns:ns0=\"DAV:\"> abc def </elem>", + __LINE__); + + roundtrip(tc, + "<elem> </elem>", + "<elem xmlns:ns0=\"DAV:\"> </elem>", + __LINE__); + + roundtrip(tc, + "<?xml version='1.0' ?>\n" + "<elem> </elem>", + "<elem xmlns:ns0=\"DAV:\"> </elem>", + __LINE__); } abts_suite *testxml(abts_suite *suite) |