mirror of
https://github.com/catchorg/Catch2.git
synced 2025-08-03 22:05:39 +02:00
Add command line option 'never' to --wait-for-keypress (#1866)
Co-authored-by: Martin Hořeňovský <martin.horenovsky@gmail.com>
This commit is contained in:

committed by
Martin Hořeňovský

parent
2441c2faab
commit
6a2c025bfc
@@ -8072,6 +8072,102 @@ with expansion:
|
||||
"Unable to convert 'oops' to destination type" ( contains: "convert" and
|
||||
contains: "oops" )
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Process can be configured on command line
|
||||
abort
|
||||
wait-for-keypress
|
||||
Accepted options
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
CHECK( cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) )
|
||||
with expansion:
|
||||
{?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.waitForKeypress == std::get<1>(input) )
|
||||
with expansion:
|
||||
0 == 0
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Process can be configured on command line
|
||||
abort
|
||||
wait-for-keypress
|
||||
Accepted options
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
CHECK( cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) )
|
||||
with expansion:
|
||||
{?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.waitForKeypress == std::get<1>(input) )
|
||||
with expansion:
|
||||
1 == 1
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Process can be configured on command line
|
||||
abort
|
||||
wait-for-keypress
|
||||
Accepted options
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
CHECK( cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) )
|
||||
with expansion:
|
||||
{?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.waitForKeypress == std::get<1>(input) )
|
||||
with expansion:
|
||||
2 == 2
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Process can be configured on command line
|
||||
abort
|
||||
wait-for-keypress
|
||||
Accepted options
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
CHECK( cli.parse({"test", "--wait-for-keypress", std::get<0>(input)}) )
|
||||
with expansion:
|
||||
{?}
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE( config.waitForKeypress == std::get<1>(input) )
|
||||
with expansion:
|
||||
3 == 3
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Process can be configured on command line
|
||||
abort
|
||||
wait-for-keypress
|
||||
invalid options are reported
|
||||
-------------------------------------------------------------------------------
|
||||
CmdLine.tests.cpp:<line number>
|
||||
...............................................................................
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
CHECK( !result )
|
||||
with expansion:
|
||||
true
|
||||
|
||||
CmdLine.tests.cpp:<line number>: PASSED:
|
||||
REQUIRE_THAT( result.errorMessage(), Contains("never") && Contains("both") )
|
||||
with expansion:
|
||||
"keypress argument must be one of: never, start, exit or both. 'sometimes'
|
||||
not recognised" ( contains: "never" and contains: "both" )
|
||||
|
||||
-------------------------------------------------------------------------------
|
||||
Process can be configured on command line
|
||||
nothrow
|
||||
@@ -14319,5 +14415,5 @@ Misc.tests.cpp:<line number>: PASSED:
|
||||
|
||||
===============================================================================
|
||||
test cases: 329 | 239 passed | 86 failed | 4 failed as expected
|
||||
assertions: 1848 | 1679 passed | 148 failed | 21 failed as expected
|
||||
assertions: 1858 | 1689 passed | 148 failed | 21 failed as expected
|
||||
|
||||
|
Reference in New Issue
Block a user