Author: dfabulich
Date: Tue Nov 20 15:55:01 2007
New Revision: 596883

URL: http://svn.apache.org/viewvc?rev=596883&view=rev
Log:
[SUREFIRE-307] Test path with spaces

Added:
    
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgPathWithSpaces.java
    
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path 
with spaces/
    
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path 
with spaces/pom.xml
    
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path 
with spaces/src/
    
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path 
with spaces/src/test/
    
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path 
with spaces/src/test/java/
    
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path 
with spaces/src/test/java/TestNGSuiteTest.java
    
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path 
with spaces/src/test/resources/
    
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path 
with spaces/src/test/resources/test.txt

Added: 
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgPathWithSpaces.java
URL: 
http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgPathWithSpaces.java?rev=596883&view=auto
==============================================================================
--- 
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgPathWithSpaces.java
 (added)
+++ 
maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/TestNgPathWithSpaces.java
 Tue Nov 20 15:55:01 2007
@@ -0,0 +1,32 @@
+package org.apache.maven.surefire.its;
+
+
+
+import java.io.File;
+
+import org.apache.maven.integrationtests.AbstractMavenIntegrationTestCase;
+import org.apache.maven.it.Verifier;
+import org.apache.maven.it.util.ResourceExtractor;
+
+/**
+ * Test TestNG test in a directory with spaces
+ * 
+ * @author <a href="mailto:[EMAIL PROTECTED]">Dan Fabulich</a>
+ * 
+ */
+public class TestNgPathWithSpaces
+    extends AbstractMavenIntegrationTestCase
+{
+    public void testTestNgTestWithSpaces ()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), 
"/testng-path with spaces" );
+
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        verifier.executeGoal( "test" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+        
+        HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );
+    }
+}

Added: 
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path 
with spaces/pom.xml
URL: 
http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path%20with%20spaces/pom.xml?rev=596883&view=auto
==============================================================================
--- 
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path 
with spaces/pom.xml (added)
+++ 
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path 
with spaces/pom.xml Tue Nov 20 15:55:01 2007
@@ -0,0 +1,60 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Licensed to the Apache Software Foundation (ASF) under one
+  ~ or more contributor license agreements.  See the NOTICE file
+  ~ distributed with this work for additional information
+  ~ regarding copyright ownership.  The ASF licenses this file
+  ~ to you under the Apache License, Version 2.0 (the
+  ~ "License"); you may not use this file except in compliance
+  ~ with the License.  You may obtain a copy of the License at
+  ~
+  ~     http://www.apache.org/licenses/LICENSE-2.0
+  ~
+  ~ Unless required by applicable law or agreed to in writing,
+  ~ software distributed under the License is distributed on an
+  ~ "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+  ~ KIND, either express or implied.  See the License for the
+  ~ specific language governing permissions and limitations
+  ~ under the License.
+  -->
+
+<project xmlns="http://maven.apache.org/POM/4.0.0";
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 
http://maven.apache.org/maven-v4_0_0.xsd";>
+  <modelVersion>4.0.0</modelVersion>
+
+  <groupId>org.apache.maven.plugins.surefire</groupId>
+  <artifactId>testng-path-with-spaces</artifactId>
+  <version>1.0-SNAPSHOT</version>
+  <name>TestNG Suites</name>
+  <description>Runs testng tests in a path with spaces</description>
+
+  <properties>
+     <testNgVersion>5.7</testNgVersion>
+  </properties>
+
+  <dependencies>
+    <dependency>
+      <groupId>org.testng</groupId>
+      <artifactId>testng</artifactId>
+      <version>${testNgVersion}</version>
+      <classifier>jdk15</classifier>
+      <scope>test</scope>
+    </dependency>
+  </dependencies>
+
+  <build>
+    <plugins>
+      <plugin>
+        <groupId>org.apache.maven.plugins</groupId>
+        <artifactId>maven-compiler-plugin</artifactId>
+        <configuration>
+          <source>1.5</source>
+          <target>1.5</target>
+        </configuration>
+      </plugin>
+    </plugins>
+  </build>
+
+
+</project>

Added: 
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path 
with spaces/src/test/java/TestNGSuiteTest.java
URL: 
http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path%20with%20spaces/src/test/java/TestNGSuiteTest.java?rev=596883&view=auto
==============================================================================
--- 
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path 
with spaces/src/test/java/TestNGSuiteTest.java (added)
+++ 
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path 
with spaces/src/test/java/TestNGSuiteTest.java Tue Nov 20 15:55:01 2007
@@ -0,0 +1,14 @@
+import java.io.File;
+import java.net.URISyntaxException;
+
+import org.testng.annotations.Test;
+
+
+public class TestNGSuiteTest {
+
+       @Test
+       public void loadTestResourceWithSpaces() throws URISyntaxException
+       {
+               new File( getClass().getResource( "test.txt" ).toURI() );
+       }
+}
\ No newline at end of file

Added: 
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path 
with spaces/src/test/resources/test.txt
URL: 
http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path%20with%20spaces/src/test/resources/test.txt?rev=596883&view=auto
==============================================================================
--- 
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path 
with spaces/src/test/resources/test.txt (added)
+++ 
maven/surefire/trunk/surefire-integration-tests/src/test/resources/testng-path 
with spaces/src/test/resources/test.txt Tue Nov 20 15:55:01 2007
@@ -0,0 +1 @@
+Hello world!
\ No newline at end of file


Reply via email to