diff options
author | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2011-09-10 03:05:29 +0000 |
---|---|---|
committer | arseny.kapoulkine <arseny.kapoulkine@99668b35-9821-0410-8761-19e4c4f06640> | 2011-09-10 03:05:29 +0000 |
commit | 7757503d72c7ce61e562fd5a1fd19ae90472410b (patch) | |
tree | 21b372af01729a9218692e6da051a3926f2596cf /tests/test_write.cpp | |
parent | 74f33b1a6c09513626242e6568f40569cd8709fa (diff) |
Added format_no_escapes flag
git-svn-id: http://pugixml.googlecode.com/svn/trunk@819 99668b35-9821-0410-8761-19e4c4f06640
Diffstat (limited to 'tests/test_write.cpp')
-rw-r--r-- | tests/test_write.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/test_write.cpp b/tests/test_write.cpp index 3871bf6..094bf59 100644 --- a/tests/test_write.cpp +++ b/tests/test_write.cpp @@ -97,6 +97,14 @@ TEST_XML(write_escape_unicode, "<node attr='㰀'/>") #endif } +TEST_XML(write_no_escapes, "<node attr=''>text</node>") +{ + doc.child(STR("node")).attribute(STR("attr")) = STR("<>'\"&\x04\r\n\t"); + doc.child(STR("node")).first_child().set_value(STR("<>'\"&\x04\r\n\t")); + + CHECK_NODE_EX(doc, STR("<node attr=\"<>'\"&\x04\r\n\t\"><>'\"&\x04\r\n\t</node>"), STR(""), format_raw | format_no_escapes); +} + struct test_writer: xml_writer { std::basic_string<pugi::char_t> contents; |