diff --git a/tests/test_write.cpp b/tests/test_write.cpp index 5cd92a5..e59b7ab 100644 --- a/tests/test_write.cpp +++ b/tests/test_write.cpp @@ -639,6 +639,30 @@ TEST_XML_FLAGS(write_roundtrip, " pad(bufl - l, STR('v')); + a.set_value(pad.c_str()); + + std::string s = save_narrow(doc, 0, encoding_auto); + CHECK(s.size() == basel + bufl - l); + } +} + #ifndef PUGIXML_NO_EXCEPTIONS struct throwing_writer: pugi::xml_writer {