pugixml/tests
Arseny Kapoulkine 47c15ad949 Implement document fragment parsing.
Introduce a notable behavior change in default parsing mode: documents without a
document element node are now considered invalid. This is technically a breaking change,
however the amount of documents it affects is very small, all parsed data still persists,
and lack of this check results in very confusing behavior in a number of cases.

In order to be able to parse documents without an element node, a fragment parsing flag is
introduced.

Parsing a buffer in fragment mode treats the buffer as a fragment of a valid XML.
As a consequence, top-level PCDATA is added to the tree; additionally, there are no
restrictions on the number of nodes -- so documents without a document element are considered
valid.

Due to the way parsing works internally, load_buffer_inplace occasionally can not preserve
the document contents if it's parsed in a fragment mode. While unfortunate, this problem is
fundamental; since the use case is relatively obscure, hopefully documenting this shortcoming
will be enough.

git-svn-id: https://pugixml.googlecode.com/svn/trunk@980 99668b35-9821-0410-8761-19e4c4f06640
2014-02-11 06:45:27 +00:00
..
data Introduced encoding_latin1 support (conversion on loading, conversion on saving, encoding name in declaration in document::save) 2011-12-20 09:45:10 +00:00
allocator.cpp tests: Minor fixes for WinCE compilation 2012-02-19 09:05:23 +00:00
allocator.hpp Set svn:eol-style to native for all text files 2010-07-19 09:57:32 +00:00
archive.pl Make sure newlines are consistent for both .zip and .tar.gz archives 2013-07-20 05:55:22 +00:00
autotest-freebsd.sh tests: Fixed Linux startup scripts (line endings), added FreeBSD startup script 2010-05-17 07:23:37 +00:00
autotest-linux.sh tests: Updated autotest-linux.sh for Fedora 2011-07-27 07:40:38 +00:00
autotest-local.pl tests: Added MSVC11 variants to test suite 2012-03-07 05:59:09 +00:00
autotest-macos.sh tests: Final MacOS fixes 2010-05-20 17:51:32 +00:00
autotest-remote-host.pl tests: Added wait for server to remote host, added automatic VM launch 2010-05-13 16:48:46 +00:00
autotest-remote-server.pl tests: Disabled VM shutdown/startup overlap to decrease peak memory consumption 2011-07-24 06:19:57 +00:00
autotest-report.pl tests: Added MSVC11 variants to test suite 2012-03-07 05:59:09 +00:00
autotest-solaris.sh tests: Added Solaris autotest 2010-05-25 22:19:57 +00:00
common.hpp Set svn:eol-style to native for all text files 2010-07-19 09:57:32 +00:00
gcov-filter.pl tests: Introduced fullcoverage mode 2010-08-29 15:46:30 +00:00
helpers.hpp tests: Added tests for read-only xml_text operations 2012-03-23 03:25:03 +00:00
main.cpp Replace memory-management functions before every test. 2014-02-10 16:56:55 +00:00
test.cpp tests: Minor fixes for WinCE compilation 2012-02-19 09:05:23 +00:00
test.hpp Fix test suite stringizing macros to be C++11-compliant 2014-02-08 20:39:25 +00:00
test_document.cpp Implement document fragment parsing. 2014-02-11 06:45:27 +00:00
test_dom_modify.cpp Implement document fragment parsing. 2014-02-11 06:45:27 +00:00
test_dom_text.cpp Implement long long support if PUGIXML_HAS_LONG_LONG is defined (autodetection is not implemented yet) 2014-02-08 20:36:09 +00:00
test_dom_traverse.cpp Implement long long support if PUGIXML_HAS_LONG_LONG is defined (autodetection is not implemented yet) 2014-02-08 20:36:09 +00:00
test_header_guard.cpp Set svn:eol-style to native for all text files 2010-07-19 09:57:32 +00:00
test_header_iosfwd_1.cpp Set svn:eol-style to native for all text files 2010-07-19 09:57:32 +00:00
test_header_iosfwd_2.cpp Set svn:eol-style to native for all text files 2010-07-19 09:57:32 +00:00
test_header_iostream_1.cpp Set svn:eol-style to native for all text files 2010-07-19 09:57:32 +00:00
test_header_iostream_2.cpp Set svn:eol-style to native for all text files 2010-07-19 09:57:32 +00:00
test_header_string_1.cpp Set svn:eol-style to native for all text files 2010-07-19 09:57:32 +00:00
test_header_string_2.cpp Set svn:eol-style to native for all text files 2010-07-19 09:57:32 +00:00
test_header_string_iostream.cpp tests: Added new test for string/istream include interaction (this actually fails on DMC) 2012-03-20 05:05:35 +00:00
test_memory.cpp Implement document fragment parsing. 2014-02-11 06:45:27 +00:00
test_parse.cpp Implement document fragment parsing. 2014-02-11 06:45:27 +00:00
test_parse_doctype.cpp Implement document fragment parsing. 2014-02-11 06:45:27 +00:00
test_unicode.cpp tests: Android compilation fixes 2012-03-06 08:49:58 +00:00
test_version.cpp Update PUGIXML_VERSION define 2014-02-10 05:11:05 +00:00
test_write.cpp Implement document fragment parsing. 2014-02-11 06:45:27 +00:00
test_xpath.cpp Fix invalid assertion in XPath: reallocation can result in allocating buffer of the same size due to pointer-sized alignment 2013-03-20 02:44:05 +00:00
test_xpath_api.cpp tests: Add an explicit test for empty xpath_node_set copying (regression test for issue 143) 2012-02-18 03:35:37 +00:00
test_xpath_functions.cpp XPath: Minor lang() fix (use ASCII lowercase because language names are ASCII-only anyway) 2010-09-11 13:30:49 +00:00
test_xpath_operators.cpp XPath: Add unit test for unary minus and union precedences 2012-11-17 22:50:05 +00:00
test_xpath_parse.cpp tests: Fixed CW compilation 2010-10-22 04:28:52 +00:00
test_xpath_paths.cpp tests: Minor fixes 2010-08-29 15:48:05 +00:00
test_xpath_paths_abbrev_w3c.cpp Set svn:eol-style to native for all text files 2010-07-19 09:57:32 +00:00
test_xpath_paths_w3c.cpp Set svn:eol-style to native for all text files 2010-07-19 09:57:32 +00:00
test_xpath_variables.cpp tests: Improved document order comparison coverage 2010-08-29 15:51:35 +00:00
test_xpath_xalan_1.cpp tests: Minor fix for MinGW 3.4 2010-08-30 05:01:19 +00:00
test_xpath_xalan_2.cpp Fix bogus Clang 3.4 warning 2014-02-11 04:55:36 +00:00
test_xpath_xalan_3.cpp Set svn:eol-style to native for all text files 2010-07-19 09:57:32 +00:00
test_xpath_xalan_4.cpp Set svn:eol-style to native for all text files 2010-07-19 09:57:32 +00:00
test_xpath_xalan_5.cpp Set svn:eol-style to native for all text files 2010-07-19 09:57:32 +00:00
writer_string.cpp tests: Android compilation fixes 2012-03-06 08:49:58 +00:00
writer_string.hpp tests: Android compilation fixes 2012-03-06 08:49:58 +00:00