Fix filename as tag bug

When a test file isn't provided with "/" in the path,
the filename isn't registered as a tag.
Fixing by providing a conditon for this edge case.

Closes #2328
This commit is contained in:
Martin Mekota 2022-03-17 20:56:11 +01:00 committed by Martin Hořeňovský
parent ff151d2833
commit 0aa4dbae2e

View File

@ -127,6 +127,10 @@ namespace Catch {
filename.erase(0, lastSlash);
filename[0] = '#';
}
else
{
filename.insert(0, "#");
}
auto lastDot = filename.find_last_of('.');
if (lastDot != std::string::npos) {