sanitize test work directory name
authorIgor Fedorenko <ifedorenko@apache.org>
Tue, 2 Sep 2014 17:25:12 +0000 (13:25 -0400)
committerIgor Fedorenko <ifedorenko@apache.org>
Tue, 2 Sep 2014 17:25:12 +0000 (13:25 -0400)
Signed-off-by: Igor Fedorenko <ifedorenko@apache.org>
maven-plugin-testing-harness/src/main/java/org/apache/maven/plugin/testing/resources/TestResources.java

index e25f398..1f5a33a 100644 (file)
@@ -61,7 +61,12 @@ public class TestResources
     @Override
     protected void starting( Description d )
     {
-        name = d.getTestClass().getSimpleName() + "_" + d.getMethodName();
+        String methodName = d.getMethodName();
+        if ( methodName != null )
+        {
+            methodName = methodName.replace('/', '_').replace('\\', '_');
+        }
+        name = d.getTestClass().getSimpleName() + "_" + methodName;
     }
 
     /**