Properly handle values with spaces
Closes gh-10741
This commit is contained in:
@@ -40,7 +40,7 @@ public class SystemPropertyFormatterTests {
|
||||
@Test
|
||||
public void parseKeyWithValue() {
|
||||
assertThat(SystemPropertyFormatter.format("key1", "value1"))
|
||||
.isEqualTo("-Dkey1=value1");
|
||||
.isEqualTo("-Dkey1=\"value1\"");
|
||||
}
|
||||
|
||||
@Test
|
||||
@@ -48,4 +48,10 @@ public class SystemPropertyFormatterTests {
|
||||
assertThat(SystemPropertyFormatter.format("key1", "")).isEqualTo("-Dkey1");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void parseKeyWithOnlySpace() {
|
||||
assertThat(SystemPropertyFormatter.format("key1", " "))
|
||||
.isEqualTo("-Dkey1=\" \"");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user