diff --git a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/OriginTrackedPropertiesLoaderTests.java b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/OriginTrackedPropertiesLoaderTests.java index d1ae901483..e749745387 100644 --- a/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/OriginTrackedPropertiesLoaderTests.java +++ b/spring-boot-project/spring-boot/src/test/java/org/springframework/boot/env/OriginTrackedPropertiesLoaderTests.java @@ -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; } diff --git a/spring-boot-project/spring-boot/src/test/resources/org/springframework/boot/env/test-properties.properties b/spring-boot-project/spring-boot/src/test/resources/org/springframework/boot/env/test-properties.properties index 7630cff49f..db81b6c3d7 100644 --- a/spring-boot-project/spring-boot/src/test/resources/org/springframework/boot/env/test-properties.properties +++ b/spring-boot-project/spring-boot/src/test/resources/org/springframework/boot/env/test-properties.properties @@ -42,3 +42,4 @@ test-multiline-immediate-bang=\ test-iso8859-1-chars=æ×ÈÅÞßáñÀÿ test-with-trailing-space= trailing +test-with-escaped-trailing-space= trailing\