Skip to content

Treat text blocks as files in @CsvSource #2734

Closed
@sbrannen

Description

@sbrannen

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

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.

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions