mirror of
https://github.com/catchorg/Catch2.git
synced 2024-11-22 21: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[0] = '#';
|
||||
}
|
||||
else
|
||||
{
|
||||
filename.insert(0, "#");
|
||||
}
|
||||
|
||||
auto lastDot = filename.find_last_of('.');
|
||||
if (lastDot != std::string::npos) {
|
||||
|
Loading…
Reference in New Issue
Block a user