Read-only mirrors. Development, issues and pull requests are on GitHub.

summaryrefslogtreecommitdiffhomepage
path: root/include/internal/catch_session.cpp
diff options
context:
space:
mode:
authorMartin Mekota2022-03-17 20:56:11 +0100
committerMartin Hořeňovský2022-03-18 22:32:54 +0100
commit0aa4dbae2e5d0b86fc6602354fdcea6d186752b2 (patch)
tree9a1b8fbbb484376e721ae2dba5bb25d723563edd /include/internal/catch_session.cpp
parentff151d2833d48aa630564859cd1401a93a2bb333 (diff)
downloadcatch3-0aa4dbae2e5d0b86fc6602354fdcea6d186752b2.tar.gz
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
Diffstat (limited to 'include/internal/catch_session.cpp')
-rw-r--r--include/internal/catch_session.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/internal/catch_session.cpp b/include/internal/catch_session.cpp
index 24ebe4de..6254c584 100644
--- a/include/internal/catch_session.cpp
+++ b/include/internal/catch_session.cpp
@@ -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) {