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:
Phil Nash 2013-04-05 20:55:57 +01:00
parent f186a912d4
commit 4746caacaf
9 changed files with 294 additions and 131 deletions

View file

@ -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", "" ) {