Closed
Description
Overview
PR #2721 introduced experimental support for text blocks in @CsvSource
; however, there is room for improvement.
A CSV line within a text block cannot currently contain a new line (\n
), even if it is within a quoted string; whereas, this is supported when using @CsvSource(value = ...)
.
Comments do not make sense in a single string in @CsvSource(value = ...)
, but they do make sense within @CsvSource(textBlock = ...)
.
Related Issues
- Allow rows in @CsvSource to start with a number sign (#) #2528
- Introduce support for text blocks in
@CsvSource
#2721 - Make quote character in
@CsvSource
and@CsvFileSource
configurable #2735
Deliverables
- Support
\n
within quoted strings in text blocks. - Support comment lines beginning with
#
in text blocks. - Implement robust solution for sanitizing a text block, since
String#stripIndent()
is only available on JDK 15+. - Document in the User Guide.
- Document in the Release Notes.