Progmasoft Git

catch3

Progmasoft Catch3: an independently maintained C++17 test framework with a parallel runner, property checks, snapshots and structured results.

Clonegit clone https://git.progmasoft.com/catch3

Fixed issue with reading test names from file

Commit
e8aa0bb19beef911789953c250b5eaa6571875cf
Author
Phil Nash ·
Parents
fcf0deb11612

Files · Download .tar.gz

Changes

 include/internal/catch_commandline.hpp      | 2 +-
 include/internal/catch_test_spec_parser.hpp | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/internal/catch_commandline.hpp b/include/internal/catch_commandline.hpp
index 2614e4d5..05e9f46b 100644
--- a/include/internal/catch_commandline.hpp
+++ b/include/internal/catch_commandline.hpp
@@ -49,7 +49,7 @@ namespace Catch {
         while( std::getline( f, line ) ) {
             line = trim(line);
             if( !line.empty() && !startsWith( line, "#" ) )
-                addTestOrTags( config, line );
+                addTestOrTags( config, "\"" + line + "\"" );
         }
     }
 
diff --git a/include/internal/catch_test_spec_parser.hpp b/include/internal/catch_test_spec_parser.hpp
index 6fc356e8..53c724b9 100644
--- a/include/internal/catch_test_spec_parser.hpp
+++ b/include/internal/catch_test_spec_parser.hpp
@@ -36,10 +36,10 @@ namespace Catch {
                 visitChar( m_arg[m_pos] );
             if( m_mode == Name )
                 addPattern<TestSpec::NamePattern>();
+            addFilter();
             return *this;
         }
         TestSpec testSpec() {
-            addFilter();
             return m_testSpec;
         }
     private: