-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make quote character in @CsvSource
and @CsvFileSource
configurable
#2735
Milestone
Comments
Current work on this issue can be viewed in the following feature branch: main...sbrannen:issues/2735-make-quote-character-in-CsvSource-configurable |
sbrannen
added a commit
to sbrannen/junit5
that referenced
this issue
Oct 2, 2021
Prior to this commit, the quote character for quoted strings in @CsvSource was hard coded to a single quote (') and could not be changed; however, with the recently added support for text blocks, it may be desirable to change the quote character to something else. This commit introduces a new quoteCharacter attribute in @CsvSource that allows the user to change the quote character. The quoteCharacter defaults to a single quote for backward compatibility. Closes junit-team#2735
sbrannen
added a commit
that referenced
this issue
Oct 2, 2021
Prior to this commit, the quote character for quoted strings in @CsvSource was hard coded to a single quote (') and could not be changed; however, with the recently added support for text blocks, it may be desirable to change the quote character to something else. This commit introduces a new quoteCharacter attribute in @CsvSource that allows the user to change the quote character. The quoteCharacter defaults to a single quote for backward compatibility. Closes #2735
sbrannen
added a commit
that referenced
this issue
Oct 3, 2021
sbrannen
added a commit
that referenced
this issue
Oct 3, 2021
Reopening to add the same support for |
sbrannen
changed the title
Make quote character in
Make quote character in Nov 3, 2021
@CsvSource
configurable@CsvSource
and @CsvFileSource
configurable
sbrannen
added a commit
that referenced
this issue
Nov 5, 2021
Prior to this commit, the quote character for quoted strings in @CsvFileSource was hard coded to a double quote (") and could not be changed. Commit f1cbfbe introduced a new quoteCharacter attribute in @CsvSource that allows the user to change the quote character. For consistency between the two features, this commit introduces a new quoteCharacter attribute in @CsvFileSource. The quoteCharacter defaults to a double quote for backward compatibility. Closes #2735
runningcode
pushed a commit
to runningcode/junit5
that referenced
this issue
Feb 15, 2023
Prior to this commit, the quote character for quoted strings in @CsvSource was hard coded to a single quote (') and could not be changed; however, with the recently added support for text blocks, it may be desirable to change the quote character to something else. This commit introduces a new quoteCharacter attribute in @CsvSource that allows the user to change the quote character. The quoteCharacter defaults to a single quote for backward compatibility. Closes junit-team#2735
runningcode
pushed a commit
to runningcode/junit5
that referenced
this issue
Feb 15, 2023
runningcode
pushed a commit
to runningcode/junit5
that referenced
this issue
Feb 15, 2023
Prior to this commit, the quote character for quoted strings in @CsvFileSource was hard coded to a double quote (") and could not be changed. Commit f1cbfbe introduced a new quoteCharacter attribute in @CsvSource that allows the user to change the quote character. For consistency between the two features, this commit introduces a new quoteCharacter attribute in @CsvFileSource. The quoteCharacter defaults to a double quote for backward compatibility. Closes junit-team#2735
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Overview
In order to treat text blocks as files in
@CsvSource
(see #2734), we should allow users to change the quote character to"
when using text blocks.This will of course allow one to change the quote character to anything other than
'
or"
, even when using thevalue
attribute in@CsvSource
, but it is assumed the primary use case is using double quotes in text blocks.For consistency in supported features, we should do the same for
@CsvFileSource
.Related Issues
@CsvSource
#2721@CsvSource
#2734Deliverables
char quoteCharacter() default '\'';
attribute in@CsvSource
.char quoteCharacter() default '"';
attribute in@CsvFileSource
.The text was updated successfully, but these errors were encountered: