mirror of
https://github.com/ysoftdevs/DependencyCheck.git
synced 2026-01-15 08:13:43 +01:00
Added support to parse pom.xml contained within a JAR
Former-commit-id: 0f6ea59241f29e5c3d10f7f94ae153525024dbe7
This commit is contained in:
@@ -4,6 +4,7 @@
|
||||
*/
|
||||
package org.codesecure.dependencycheck.analyzer;
|
||||
|
||||
import java.util.Properties;
|
||||
import org.codesecure.dependencycheck.analyzer.JarAnalyzer;
|
||||
import org.codesecure.dependencycheck.dependency.Dependency;
|
||||
import org.codesecure.dependencycheck.dependency.Evidence;
|
||||
@@ -130,4 +131,16 @@ public class JarAnalyzerTest {
|
||||
boolean result = instance.supportsExtension(extension);
|
||||
assertEquals(expResult, result);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testInterpolateString() {
|
||||
Properties prop = new Properties();
|
||||
prop.setProperty("key", "value");
|
||||
prop.setProperty("nested", "nested ${key}");
|
||||
String text = "This is a test of '${key}' '${nested}'";
|
||||
String expResults = "This is a test of 'value' 'nested value'";
|
||||
JarAnalyzer instance = new JarAnalyzer();
|
||||
String results = instance.interpolateString(text, prop);
|
||||
assertEquals(expResults, results);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user