mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 23:36:11 +01:00
Output option description lines that don't end in newline
This commit is contained in:
parent
e2d215e9c0
commit
dae5808666
@ -183,6 +183,7 @@ namespace Catch {
|
|||||||
addIndent( os, indent );
|
addIndent( os, indent );
|
||||||
os << paragraph << "\n";
|
os << paragraph << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
inline std::string addLineBreaks( const std::string& str, std::size_t columns, std::size_t indent = 0 ) {
|
inline std::string addLineBreaks( const std::string& str, std::size_t columns, std::size_t indent = 0 ) {
|
||||||
std::ostringstream oss;
|
std::ostringstream oss;
|
||||||
std::string::size_type pos = 0;
|
std::string::size_type pos = 0;
|
||||||
@ -193,6 +194,9 @@ namespace Catch {
|
|||||||
pos = newline+1;
|
pos = newline+1;
|
||||||
newline = str.find_first_of( '\n', pos );
|
newline = str.find_first_of( '\n', pos );
|
||||||
}
|
}
|
||||||
|
if( pos != str.size() )
|
||||||
|
recursivelyWrapLine( oss, str.substr( pos, str.size()-pos ), columns, indent );
|
||||||
|
|
||||||
return oss.str();
|
return oss.str();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user