Skip to content

Can no longer use # as delimiter with @CsvSource and @CsvFileSource #5028

@hwellmann

Description

@hwellmann

Some of our tests started failing after upgrading from JUnit Jupiter 5.13.4 to JUnit Jupiter 6.0.0.

Steps to reproduce

Example:

@ParameterizedTest
@CsvSource(delimiterString = "#", textBlock = """
    foo # bar
    """)
void csv(String a, String b) {
}

Fails with an exception:

Caused by: java.lang.IllegalArgumentException: Control characters must differ (fieldSeparator=#, quoteCharacter=', commentCharacter=#)

Perhaps there should be an attribute in @CsvSource to override the comment character.

Metadata

Metadata

Assignees

No one assigned

    Type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions