mirror of
				https://github.com/catchorg/Catch2.git
				synced 2025-11-04 05:59:32 +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:
		
				
					committed by
					
						
						Martin Hořeňovský
					
				
			
			
				
	
			
			
			
						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) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user