aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/org/sonarsource/scanner/cli/PropertyResolverTest.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/test/java/org/sonarsource/scanner/cli/PropertyResolverTest.java b/src/test/java/org/sonarsource/scanner/cli/PropertyResolverTest.java
index eecca98..5391671 100644
--- a/src/test/java/org/sonarsource/scanner/cli/PropertyResolverTest.java
+++ b/src/test/java/org/sonarsource/scanner/cli/PropertyResolverTest.java
@@ -104,6 +104,18 @@ public class PropertyResolverTest {
assertThat(resolved.get("B")).isEqualTo("value b");
assertThat(resolved.get("C")).isEqualTo("${A value b}");
}
+
+ @Test
+ public void missing_var() {
+ Map<String, String> env = new HashMap<>();
+ Properties map = new Properties();
+ map.put("A", "/path/$missing var/");
+
+ PropertyResolver resolver = new PropertyResolver(map, env);
+ Properties resolved = resolver.resolve();
+ assertThat(resolved.get("A")).isEqualTo("/path/ var/");
+
+ }
@Test
public void fail_loop_properties_resolution() {