mirror of
https://github.com/spring-projects/spring-boot.git
synced 2024-08-29 03:06:45 +08:00
Add trailing escape character test
Update `OriginTrackedPropertiesLoaderTests` to also test that an escape character can be the last character on a line.
This commit is contained in:
parent
2eeffe7931
commit
fdc6e80163
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2012-2019 the original author or authors.
|
||||
* Copyright 2012-2020 the original author or authors.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@ -248,6 +248,12 @@ class OriginTrackedPropertiesLoaderTests {
|
||||
assertThat(getValue(value)).isEqualTo("trailing ");
|
||||
}
|
||||
|
||||
@Test
|
||||
void getPropertyWithEscapedTrailingSpace() {
|
||||
OriginTrackedValue value = this.properties.get("test-with-escaped-trailing-space");
|
||||
assertThat(getValue(value)).isEqualTo("trailing ");
|
||||
}
|
||||
|
||||
private Object getValue(OriginTrackedValue value) {
|
||||
return (value != null) ? value.getValue() : null;
|
||||
}
|
||||
|
@ -42,3 +42,4 @@ test-multiline-immediate-bang=\
|
||||
test-iso8859-1-chars=<EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
||||
|
||||
test-with-trailing-space= trailing
|
||||
test-with-escaped-trailing-space= trailing\
|
||||
|
Loading…
Reference in New Issue
Block a user