boostorg / boostorg/test

print_escaped_cdata only escapes first cdata

Open
#350 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C++
Stars
213
Forks
149
Avg merge
18h 17m
Merged PRs (30d)
2

Description

This works:
```c++
BOOST_AUTO_TEST_CASE(one_embedded_cdata_section)
{
BOOST_REQUIRE_MESSAGE(false, "AdditionalTextAfterwards");
}
```

This produces invalid XML data using -o XML:
```c++
BOOST_AUTO_TEST_CASE(two_embedded_cdata_sections)
{
BOOST_REQUIRE_MESSAGE(false, "AdditionalTextAfterwards");
}
```

I believe the if test here:
[ if( pos == const_string::npos )
](https://github.com/boostorg/test/blob/9d863d07e864ef663e3e8573b55905099b938d3e/include/boost/test/utils/xml_printer.hpp#L102)
needs to be a loop instead.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.