You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by ti...@apache.org on 2019/05/09 17:37:08 UTC

[maven-surefire] branch SUREFIRE-1617 updated: new IT

This is an automated email from the ASF dual-hosted git repository.

tibordigana pushed a commit to branch SUREFIRE-1617
in repository https://gitbox.apache.org/repos/asf/maven-surefire.git


The following commit(s) were added to refs/heads/SUREFIRE-1617 by this push:
     new fed6c93  new IT
fed6c93 is described below

commit fed6c9382c28857451483cdf8e97c014ee4f5c60
Author: tibordigana <ti...@apache.org>
AuthorDate: Thu May 9 19:36:56 2019 +0200

    new IT
---
 .../org/apache/maven/surefire/its/UmlautDirIT.java | 33 ++++++++++++++--------
 1 file changed, 22 insertions(+), 11 deletions(-)

diff --git a/surefire-its/src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java b/surefire-its/src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java
index 39779f0..a03c386 100644
--- a/surefire-its/src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java
+++ b/surefire-its/src/test/java/org/apache/maven/surefire/its/UmlautDirIT.java
@@ -68,12 +68,21 @@ public class UmlautDirIT extends SurefireJUnit4IntegrationTestCase
     }
 
     @Test
-    public void surefire1617()
+    public void surefire1617WithSpacesInLocalRepo()
+            throws Exception
+    {
+        unpackWithSpacesInLocalRepo()
+                .executeTest()
+                .verifyErrorFreeLog()
+                .assertTestSuiteResults( 1, 0, 0, 0 );
+    }
+
+    @Test
+    public void surefire1617WithColonInProjectDir()
             throws Exception
     {
         assumeTrue( IS_OS_LINUX );
-        unpackWithNewLocalRepo()
-                .debugLogging()
+        unpackToGermanUmplautDirectory( "this is: a test", "surefire-1617" )
                 .executeTest()
                 .verifyErrorFreeLog()
                 .assertTestSuiteResults( 1, 0, 0, 0 );
@@ -83,7 +92,7 @@ public class UmlautDirIT extends SurefireJUnit4IntegrationTestCase
     public void testUmlaut()
         throws Exception
     {
-        unpackToGermanUmplautDirectory( "1" )
+        unpackToGermanUmplautDirectory( "/junit-pathWith\u00DCmlaut_", "1" )
                 .executeTest()
                 .verifyErrorFreeLog()
                 .assertTestSuiteResults( 1, 0, 0, 0 );
@@ -93,27 +102,28 @@ public class UmlautDirIT extends SurefireJUnit4IntegrationTestCase
     public void testUmlautIsolatedClassLoader()
         throws Exception
     {
-        unpackToGermanUmplautDirectory( "2" )
+        unpackToGermanUmplautDirectory( "/junit-pathWith\u00DCmlaut_", "2" )
                 .useSystemClassLoader( false )
                 .executeTest()
                 .assertTestSuiteResults( 1, 0, 0, 0 );
     }
 
-    private SurefireLauncher unpackToGermanUmplautDirectory( String postfix ) throws IOException
+    private SurefireLauncher unpackToGermanUmplautDirectory( String projectDirectory, String postfix )
+            throws IOException
     {
         SurefireLauncher unpack = unpack( "junit-pathWithUmlaut" );
         MavenLauncher maven = unpack.maven();
 
-        File dest = new File( maven.getUnpackedAt().getParentFile().getPath(),
-                "/junit-pathWith\u00DCmlaut_" + postfix );
+        File dest = new File( maven.getUnpackedAt().getParentFile().getPath(), projectDirectory + postfix );
         maven.moveUnpackTo( dest );
         return unpack;
     }
 
-    private SurefireLauncher unpackWithNewLocalRepo() throws IOException
+    private SurefireLauncher unpackWithSpacesInLocalRepo()
+            throws IOException
     {
         String newLocalRepo =
-                Paths.get( System.getProperty( "user.dir" ), "target", "local repo for  SUREFIRE-1617" ).toString();
+                Paths.get( System.getProperty( "user.dir" ), "target", "local repo for SUREFIRE-1617" ).toString();
         String defaultLocalRepo = new MavenLauncher( getClass(), "junit-pathWithUmlaut", null ).getLocalRepository();
 
         copyFolder( Paths.get( defaultLocalRepo, "org", "apache", "maven", "surefire" ),
@@ -126,7 +136,8 @@ public class UmlautDirIT extends SurefireJUnit4IntegrationTestCase
         return unpack( "junit-pathWithUmlaut" );
     }
 
-    private static void copyFolder( Path src, Path dest ) throws IOException
+    private static void copyFolder( Path src, Path dest )
+            throws IOException
     {
         if ( !exists( dest ) )
         {