Skip to content

Commit 24b3c40

Browse files
committed
Improve trimsSpacesUsingStringTrim() test
See commit 2a52a06 See #3824
1 parent f0d1f1d commit 24b3c40

File tree

1 file changed

+16
-2
lines changed

1 file changed

+16
-2
lines changed

jupiter-tests/src/test/java/org/junit/jupiter/params/provider/CsvArgumentsProviderTests.java

Lines changed: 16 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -131,11 +131,25 @@ void trimsTrailingSpaces() {
131131
void trimsSpacesUsingStringTrim() {
132132
// \u0000 (null) removed by trim(), preserved by strip()
133133
// \u00A0 (non-breaking space) preserved by trim(), removed by strip()
134-
var annotation = csvSource().lines("\u0000foo,\u00A0bar", "\u0000' foo',\u00A0' bar'").build();
134+
var annotation = csvSource().lines(
135+
// Unquoted
136+
"\u0000, \u0000foo\u0000, \u00A0bar\u00A0",
137+
// Quoted
138+
"'\u0000', '\u0000 foo \u0000', ' \u00A0bar\u0000'",
139+
// Mixed
140+
"\u0000'\u0000 foo', \u00A0' bar\u0000'"//
141+
).build();
135142

136143
var arguments = provideArguments(annotation);
137144

138-
assertThat(arguments).containsExactly(array("foo", "\u00A0bar"), array(" foo", "\u00A0' bar'"));
145+
assertThat(arguments).containsExactly(
146+
// Unquoted
147+
array("", "foo", "\u00A0bar\u00A0"),
148+
// Quoted
149+
array("\u0000", "\u0000 foo \u0000", " \u00A0bar\u0000"),
150+
// Mixed
151+
array("\u0000 foo", "\u00A0' bar\u0000'")//
152+
);
139153
}
140154

141155
@Test

0 commit comments

Comments
 (0)