mirror of
https://github.com/GothenburgBitFactory/timewarrior.git
synced 2025-07-07 20:06:39 +02:00
Tests: Fixed bug in ::diag
This commit is contained in:
parent
a8177a33d7
commit
0870c7965f
1 changed files with 3 additions and 1 deletions
|
@ -416,7 +416,9 @@ void UnitTest::diag (const std::string& text)
|
||||||
{
|
{
|
||||||
auto start = text.find_first_not_of (" \t\n\r\f");
|
auto start = text.find_first_not_of (" \t\n\r\f");
|
||||||
auto end = text.find_last_not_of (" \t\n\r\f");
|
auto end = text.find_last_not_of (" \t\n\r\f");
|
||||||
std::cout << "# " << text.substr (start, end - start + 1) << "\n";
|
if (start != std::string::npos &&
|
||||||
|
end != std::string::npos)
|
||||||
|
std::cout << "# " << text.substr (start, end - start + 1) << "\n";
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue