mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-26 23:36:11 +01:00
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:
parent
ff151d2833
commit
0aa4dbae2e
@ -127,6 +127,10 @@ namespace Catch {
|
|||||||
filename.erase(0, lastSlash);
|
filename.erase(0, lastSlash);
|
||||||
filename[0] = '#';
|
filename[0] = '#';
|
||||||
}
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
filename.insert(0, "#");
|
||||||
|
}
|
||||||
|
|
||||||
auto lastDot = filename.find_last_of('.');
|
auto lastDot = filename.find_last_of('.');
|
||||||
if (lastDot != std::string::npos) {
|
if (lastDot != std::string::npos) {
|
||||||
|
Loading…
Reference in New Issue
Block a user