mirror of
https://github.com/catchorg/Catch2.git
synced 2025-05-30 16:37:56 +00:00
LineWrapper can indent first line differently to subsequent lines
- use this to wrap Given/ When/ Then with indent after the :
This commit is contained in:
parent
f186a912d4
commit
4746caacaf
9 changed files with 294 additions and 131 deletions
|
@ -467,6 +467,14 @@ TEST_CASE( "Long strings can be wrapped", "[wrap]" ) {
|
|||
CHECK( wrapper[2] == "three" );
|
||||
CHECK( wrapper[3] == "four" );
|
||||
}
|
||||
SECTION( "Indent first line differently", "" ) {
|
||||
CHECK( Catch::LineWrapper()
|
||||
.setRight( 10 )
|
||||
.setIndent( 4 )
|
||||
.setInitialIndent( 1 )
|
||||
.wrap( testString ).toString() == " one two\n three\n four" );
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
SECTION( "With newlines", "" ) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue