Commit fdc6e801 authored by Phillip Webb's avatar Phillip Webb

Add trailing escape character test

Update `OriginTrackedPropertiesLoaderTests` to also test that an escape
character can be the last character on a line.
parent 2eeffe79
/*
* 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=
test-with-trailing-space= trailing
test-with-escaped-trailing-space= trailing\
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment