diff options
author | Evgeniy Shcherbina <ixsci@pm.me> | 2022-02-03 11:01:40 (GMT) |
---|---|---|
committer | Evgeniy Shcherbina <ixsci@pm.me> | 2022-02-03 11:12:53 (GMT) |
commit | fd6b8fa40e4f80fc04c5c8db90d92cd13097d3cf (patch) | |
tree | b6bd4310477e74492917e2a2a914e1c2c61541bc /Tests/RunCMake/GoogleTest | |
parent | fb2658165303c29163e1d4f81a10df3dd427097c (diff) | |
download | CMake-fd6b8fa40e4f80fc04c5c8db90d92cd13097d3cf.zip CMake-fd6b8fa40e4f80fc04c5c8db90d92cd13097d3cf.tar.gz CMake-fd6b8fa40e4f80fc04c5c8db90d92cd13097d3cf.tar.bz2 |
GoogleTest: Preserve spaces in test parameters
Before the fix the gtest_discover_tests() function would strip the
user data in test parameters (everything to the right of GetParam())
of spaces. Now the parameters aren't altered in any way.
Fixes #23058
Diffstat (limited to 'Tests/RunCMake/GoogleTest')
-rw-r--r-- | Tests/RunCMake/GoogleTest/GoogleTest-test1-stdout.txt | 4 | ||||
-rw-r--r-- | Tests/RunCMake/GoogleTest/GoogleTest-test2-stdout.txt | 4 | ||||
-rw-r--r-- | Tests/RunCMake/GoogleTest/fake_gtest.cpp | 1 |
3 files changed, 9 insertions, 0 deletions
diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-test1-stdout.txt b/Tests/RunCMake/GoogleTest/GoogleTest-test1-stdout.txt index 9c0b775..01b39c3 100644 --- a/Tests/RunCMake/GoogleTest/GoogleTest-test1-stdout.txt +++ b/Tests/RunCMake/GoogleTest/GoogleTest-test1-stdout.txt @@ -49,6 +49,8 @@ Test project .* *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:param/special\.case/"__osbtext"!1 \.+ +Passed +[0-9.]+ sec *Start +[0-9]+: TEST:param/special\.case/"__csb___text"!1 *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:param/special\.case/"__csb___text"!1 \.+ +Passed +[0-9.]+ sec + *Start +[0-9]+: TEST:param/special\.case/"S o m e "!1 + *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:param/special\.case/"S o m e "!1 \.+ +Passed +[0-9.]+ sec *Start +[0-9]+: TEST:ns\.param/special\.case/"semicolon;"!1 *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:ns\.param/special\.case/"semicolon;"!1 \.+ +Passed +[0-9.]+ sec *Start +[0-9]+: TEST:ns\.param/special\.case/"backslash\\"!1 @@ -63,6 +65,8 @@ Test project .* *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:ns\.param/special\.case/"__osbtext"!1 \.+ +Passed +[0-9.]+ sec *Start +[0-9]+: TEST:ns\.param/special\.case/"__csb___text"!1 *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:ns\.param/special\.case/"__csb___text"!1 \.+ +Passed +[0-9.]+ sec + *Start +[0-9]+: TEST:ns\.param/special\.case/"S o m e "!1 + *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:ns\.param/special\.case/"S o m e "!1 \.+ +Passed +[0-9.]+ sec 100% tests passed, 0 tests failed out of [0-9]+ diff --git a/Tests/RunCMake/GoogleTest/GoogleTest-test2-stdout.txt b/Tests/RunCMake/GoogleTest/GoogleTest-test2-stdout.txt index b0210c6..796e20c 100644 --- a/Tests/RunCMake/GoogleTest/GoogleTest-test2-stdout.txt +++ b/Tests/RunCMake/GoogleTest/GoogleTest-test2-stdout.txt @@ -49,6 +49,8 @@ Test project .* *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:param/special\.case/"__osbtext"!2 \.+ +Passed +[0-9.]+ sec *Start +[0-9]+: TEST:param/special\.case/"__csb___text"!2 *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:param/special\.case/"__csb___text"!2 \.+ +Passed +[0-9.]+ sec + *Start +[0-9]+: TEST:param/special\.case/"S o m e "!2 + *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:param/special\.case/"S o m e "!2 \.+ +Passed +[0-9.]+ sec *Start +[0-9]+: TEST:ns\.param/special\.case/"semicolon;"!2 *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:ns\.param/special\.case/"semicolon;"!2 \.+ +Passed +[0-9.]+ sec *Start +[0-9]+: TEST:ns\.param/special\.case/"backslash\\"!2 @@ -63,6 +65,8 @@ Test project .* *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:ns\.param/special\.case/"__osbtext"!2 \.+ +Passed +[0-9.]+ sec *Start +[0-9]+: TEST:ns\.param/special\.case/"__csb___text"!2 *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:ns\.param/special\.case/"__csb___text"!2 \.+ +Passed +[0-9.]+ sec + *Start +[0-9]+: TEST:ns\.param/special\.case/"S o m e "!2 + *[0-9]+/[0-9]+ +Test +#[0-9]+: TEST:ns\.param/special\.case/"S o m e "!2 \.+ +Passed +[0-9.]+ sec 100% tests passed, 0 tests failed out of [0-9]+ diff --git a/Tests/RunCMake/GoogleTest/fake_gtest.cpp b/Tests/RunCMake/GoogleTest/fake_gtest.cpp index aa6468c..183e106 100644 --- a/Tests/RunCMake/GoogleTest/fake_gtest.cpp +++ b/Tests/RunCMake/GoogleTest/fake_gtest.cpp @@ -61,6 +61,7 @@ int main(int argc, char** argv) std::cout << " case/4 # GetParam() = \"]]=]\"" << std::endl; std::cout << " case/5 # GetParam() = \"__osbtext\"" << std::endl; std::cout << " case/6 # GetParam() = \"__csb___text\"" << std::endl; + std::cout << " case/7 # GetParam() = \"S o m e \"" << std::endl; } } return 0; |