diff options
author | Duarte Meneses <duarte.meneses@sonarsource.com> | 2017-05-02 13:35:46 +0200 |
---|---|---|
committer | Duarte Meneses <duarte.meneses@sonarsource.com> | 2017-05-02 13:36:53 +0200 |
commit | 3c4607611c8153a8626d504a7c3627f11f24f12b (patch) | |
tree | 94222155969ff8985bef3f5679d1e48d3b93d000 /src/test/java/org/sonarsource/scanner/cli/PropertyResolverTest.java | |
parent | 30c98b7d856c973ec2556f98a1e9edb31a008b66 (diff) | |
download | sonar-scanner-cli-3c4607611c8153a8626d504a7c3627f11f24f12b.tar.gz sonar-scanner-cli-3c4607611c8153a8626d504a7c3627f11f24f12b.zip |
Add unit tests var substitions
Diffstat (limited to 'src/test/java/org/sonarsource/scanner/cli/PropertyResolverTest.java')
-rw-r--r-- | src/test/java/org/sonarsource/scanner/cli/PropertyResolverTest.java | 12 |
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() { |