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

summaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorMartin Hořeňovský2022-10-27 20:43:00 +0200
committerMartin Hořeňovský2022-10-27 20:46:59 +0200
commitd41da10c549f13d5d0d0fe54300c5f1d9f2082d9 (patch)
tree9bbfd04645e1c4610522677dc444ebedef696c0c /tests
parentd2294ad9b67001a56640eb0babde3a9fd3092bde (diff)
downloadcatch3-d41da10c549f13d5d0d0fe54300c5f1d9f2082d9.tar.gz
Change reporters to report filters in round-trippable format
Diffstat (limited to 'tests')
-rw-r--r--tests/CMakeLists.txt8
-rw-r--r--tests/SelfTest/Baselines/compact.sw.approved.txt2
-rw-r--r--tests/SelfTest/Baselines/compact.sw.multi.approved.txt2
-rw-r--r--tests/SelfTest/Baselines/console.std.approved.txt2
-rw-r--r--tests/SelfTest/Baselines/console.sw.approved.txt2
-rw-r--r--tests/SelfTest/Baselines/console.sw.multi.approved.txt2
-rw-r--r--tests/SelfTest/Baselines/console.swa4.approved.txt2
-rw-r--r--tests/SelfTest/Baselines/junit.sw.approved.txt2
-rw-r--r--tests/SelfTest/Baselines/junit.sw.multi.approved.txt2
-rw-r--r--tests/SelfTest/Baselines/sonarqube.sw.approved.txt2
-rw-r--r--tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt2
-rw-r--r--tests/SelfTest/Baselines/tap.sw.approved.txt2
-rw-r--r--tests/SelfTest/Baselines/tap.sw.multi.approved.txt2
-rw-r--r--tests/SelfTest/Baselines/xml.sw.approved.txt2
-rw-r--r--tests/SelfTest/Baselines/xml.sw.multi.approved.txt2
15 files changed, 21 insertions, 15 deletions
diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt
index df0a7d5d..698e40dd 100644
--- a/tests/CMakeLists.txt
+++ b/tests/CMakeLists.txt
@@ -611,9 +611,15 @@ foreach (reporterName # "Automake" - the simple .trs format does not support any
$<TARGET_FILE:SelfTest> [comparisons][string-case] "CaseInsensitiveLess is case insensitive"
--reporter ${reporterName}
)
+ # Different regex for these two reporters, because the commas end up xml-escaped
+ if (reporterName MATCHES "JUnit|XML")
+ set(testCaseNameFormat "&quot;CaseInsensitiveLess is case insensitive&quot;")
+ else()
+ set(testCaseNameFormat "\"CaseInsensitiveLess is case insensitive\"")
+ endif()
set_tests_properties("Reporters:Filters:${reporterName}"
PROPERTIES
- PASS_REGULAR_EXPRESSION "[fF]ilters.+\\[comparisons\\]\\[string-case\\]"
+ PASS_REGULAR_EXPRESSION "[fF]ilters.+\\[comparisons\\] \\[string-case\\] ${testCaseNameFormat}"
)
add_test(NAME "Reporters:RngSeed:${reporterName}"
diff --git a/tests/SelfTest/Baselines/compact.sw.approved.txt b/tests/SelfTest/Baselines/compact.sw.approved.txt
index bed38433..5073c080 100644
--- a/tests/SelfTest/Baselines/compact.sw.approved.txt
+++ b/tests/SelfTest/Baselines/compact.sw.approved.txt
@@ -1,4 +1,4 @@
-Filters: ~[!nonportable]~[!benchmark]~[approvals] *
+Filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals]
RNG seed: 1
Misc.tests.cpp:<line number>: passed: with 1 message: 'yay'
Compilation.tests.cpp:<line number>: passed: y.v == 0 for: 0 == 0
diff --git a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt
index 1ba95db7..af348dda 100644
--- a/tests/SelfTest/Baselines/compact.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/compact.sw.multi.approved.txt
@@ -1,4 +1,4 @@
-Filters: ~[!nonportable]~[!benchmark]~[approvals] *
+Filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals]
RNG seed: 1
Misc.tests.cpp:<line number>: passed: with 1 message: 'yay'
Compilation.tests.cpp:<line number>: passed: y.v == 0 for: 0 == 0
diff --git a/tests/SelfTest/Baselines/console.std.approved.txt b/tests/SelfTest/Baselines/console.std.approved.txt
index b7413384..5ad8447a 100644
--- a/tests/SelfTest/Baselines/console.std.approved.txt
+++ b/tests/SelfTest/Baselines/console.std.approved.txt
@@ -1,4 +1,4 @@
-Filters: ~[!nonportable]~[!benchmark]~[approvals] *
+Filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals]
Randomness seeded to: 1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/tests/SelfTest/Baselines/console.sw.approved.txt b/tests/SelfTest/Baselines/console.sw.approved.txt
index 9a539685..1ef94ee5 100644
--- a/tests/SelfTest/Baselines/console.sw.approved.txt
+++ b/tests/SelfTest/Baselines/console.sw.approved.txt
@@ -1,4 +1,4 @@
-Filters: ~[!nonportable]~[!benchmark]~[approvals] *
+Filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals]
Randomness seeded to: 1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/tests/SelfTest/Baselines/console.sw.multi.approved.txt b/tests/SelfTest/Baselines/console.sw.multi.approved.txt
index 304baec3..c281374f 100644
--- a/tests/SelfTest/Baselines/console.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/console.sw.multi.approved.txt
@@ -1,4 +1,4 @@
-Filters: ~[!nonportable]~[!benchmark]~[approvals] *
+Filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals]
Randomness seeded to: 1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/tests/SelfTest/Baselines/console.swa4.approved.txt b/tests/SelfTest/Baselines/console.swa4.approved.txt
index 1022407f..60517504 100644
--- a/tests/SelfTest/Baselines/console.swa4.approved.txt
+++ b/tests/SelfTest/Baselines/console.swa4.approved.txt
@@ -1,4 +1,4 @@
-Filters: ~[!nonportable]~[!benchmark]~[approvals] *
+Filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals]
Randomness seeded to: 1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
diff --git a/tests/SelfTest/Baselines/junit.sw.approved.txt b/tests/SelfTest/Baselines/junit.sw.approved.txt
index 617fc32c..bd983051 100644
--- a/tests/SelfTest/Baselines/junit.sw.approved.txt
+++ b/tests/SelfTest/Baselines/junit.sw.approved.txt
@@ -4,7 +4,7 @@
<testsuite name="<exe-name>" errors="17" failures="126" tests="2159" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
<properties>
<property name="random-seed" value="1"/>
- <property name="filters" value="~[!nonportable]~[!benchmark]~[approvals] *"/>
+ <property name="filters" value="&quot;*&quot; ~[!nonportable] ~[!benchmark] ~[approvals]"/>
</properties>
<testcase classname="<exe-name>.global" name="# A test name that starts with a #" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="#1027: Bitfields can be captured" time="{duration}" status="run"/>
diff --git a/tests/SelfTest/Baselines/junit.sw.multi.approved.txt b/tests/SelfTest/Baselines/junit.sw.multi.approved.txt
index 64df87e2..3231c3e8 100644
--- a/tests/SelfTest/Baselines/junit.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/junit.sw.multi.approved.txt
@@ -3,7 +3,7 @@
<testsuite name="<exe-name>" errors="17" failures="126" tests="2159" hostname="tbd" time="{duration}" timestamp="{iso8601-timestamp}">
<properties>
<property name="random-seed" value="1"/>
- <property name="filters" value="~[!nonportable]~[!benchmark]~[approvals] *"/>
+ <property name="filters" value="&quot;*&quot; ~[!nonportable] ~[!benchmark] ~[approvals]"/>
</properties>
<testcase classname="<exe-name>.global" name="# A test name that starts with a #" time="{duration}" status="run"/>
<testcase classname="<exe-name>.global" name="#1027: Bitfields can be captured" time="{duration}" status="run"/>
diff --git a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt
index fc119949..122e3dda 100644
--- a/tests/SelfTest/Baselines/sonarqube.sw.approved.txt
+++ b/tests/SelfTest/Baselines/sonarqube.sw.approved.txt
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- filters='~[!nonportable]~[!benchmark]~[approvals] *' rng-seed=1 -->
+<!-- filters='"*" ~[!nonportable] ~[!benchmark] ~[approvals]' rng-seed=1 -->
<testExecutions version="1"loose text artifact
>
<file path="tests/<exe-name>/IntrospectiveTests/Clara.tests.cpp">
diff --git a/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt b/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt
index 659080b9..8025e455 100644
--- a/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/sonarqube.sw.multi.approved.txt
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<!-- filters='~[!nonportable]~[!benchmark]~[approvals] *' rng-seed=1 -->
+<!-- filters='"*" ~[!nonportable] ~[!benchmark] ~[approvals]' rng-seed=1 -->
<testExecutions version="1">
<file path="tests/<exe-name>/IntrospectiveTests/Clara.tests.cpp">
<testCase name="Clara::Arg supports single-arg parse the way Opt does" duration="{duration}"/>
diff --git a/tests/SelfTest/Baselines/tap.sw.approved.txt b/tests/SelfTest/Baselines/tap.sw.approved.txt
index c7d60903..1832282a 100644
--- a/tests/SelfTest/Baselines/tap.sw.approved.txt
+++ b/tests/SelfTest/Baselines/tap.sw.approved.txt
@@ -1,4 +1,4 @@
-# filters: ~[!nonportable]~[!benchmark]~[approvals] *
+# filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals]
# rng-seed: 1
# # A test name that starts with a #
ok {test-number} - with 1 message: 'yay'
diff --git a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt
index f6e13276..4446141d 100644
--- a/tests/SelfTest/Baselines/tap.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/tap.sw.multi.approved.txt
@@ -1,4 +1,4 @@
-# filters: ~[!nonportable]~[!benchmark]~[approvals] *
+# filters: "*" ~[!nonportable] ~[!benchmark] ~[approvals]
# rng-seed: 1
# # A test name that starts with a #
ok {test-number} - with 1 message: 'yay'
diff --git a/tests/SelfTest/Baselines/xml.sw.approved.txt b/tests/SelfTest/Baselines/xml.sw.approved.txt
index 2c4b5b14..0e853bfe 100644
--- a/tests/SelfTest/Baselines/xml.sw.approved.txt
+++ b/tests/SelfTest/Baselines/xml.sw.approved.txt
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Catch2TestRun name="<exe-name>" rng-seed="1" catch2-version="<version>" filters="~[!nonportable]~[!benchmark]~[approvals] *">
+<Catch2TestRun name="<exe-name>" rng-seed="1" catch2-version="<version>" filters="&quot;*&quot; ~[!nonportable] ~[!benchmark] ~[approvals]">
<TestCase name="# A test name that starts with a #" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" >
<OverallResult success="true"/>
</TestCase>
diff --git a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt
index 3f5b5c52..06be5f0c 100644
--- a/tests/SelfTest/Baselines/xml.sw.multi.approved.txt
+++ b/tests/SelfTest/Baselines/xml.sw.multi.approved.txt
@@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
-<Catch2TestRun name="<exe-name>" rng-seed="1" catch2-version="<version>" filters="~[!nonportable]~[!benchmark]~[approvals] *">
+<Catch2TestRun name="<exe-name>" rng-seed="1" catch2-version="<version>" filters="&quot;*&quot; ~[!nonportable] ~[!benchmark] ~[approvals]">
<TestCase name="# A test name that starts with a #" filename="tests/<exe-name>/UsageTests/Misc.tests.cpp" >
<OverallResult success="true"/>
</TestCase>