maven-surefire-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dfabul...@apache.org
Subject svn commit: r597756 - in /maven/surefire/trunk/surefire-integration-tests/src/test: java/org/apache/maven/surefire/its/ resources/surefire-162-charsetProvider/ resources/surefire-162-charsetProvider/repo/ resources/surefire-162-charsetProvider/repo/jch...
Date Fri, 23 Nov 2007 23:08:10 GMT
Author: dfabulich
Date: Fri Nov 23 15:08:09 2007
New Revision: 597756

URL: http://svn.apache.org/viewvc?rev=597756&view=rev
Log:
[SUREFIRE-162] Integration test for charset provider.  Requires useSystemClassLoader=true.

Added:
    maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire162CharsetProviderTest.java
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/
  (with props)
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/pom.xml
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/repo/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/repo/jcharset/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/repo/jcharset/jcharset/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/repo/jcharset/jcharset/1.2.1/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/repo/jcharset/jcharset/1.2.1/jcharset-1.2.1.jar
  (with props)
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/src/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/src/test/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/src/test/java/
    maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/src/test/java/MSUREFIRE77TestCase.java

Added: maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire162CharsetProviderTest.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire162CharsetProviderTest.java?rev=597756&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire162CharsetProviderTest.java
(added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/java/org/apache/maven/surefire/its/Surefire162CharsetProviderTest.java
Fri Nov 23 15:08:09 2007
@@ -0,0 +1,30 @@
+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 charset provider (SUREFIRE-162)
+ * 
+ * @author <a href="mailto:dfabulich@apache.org">Dan Fabulich</a>
+ * 
+ */
+public class Surefire162CharsetProviderTest
+    extends AbstractMavenIntegrationTestCase
+{
+    public void testCharsetProvider ()
+        throws Exception
+    {
+        File testDir = ResourceExtractor.simpleExtractResources( getClass(), "/surefire-162-charsetProvider"
);
+
+        Verifier verifier = new Verifier( testDir.getAbsolutePath() );
+        verifier.executeGoal( "test" );
+        verifier.verifyErrorFreeLog();
+        verifier.resetStreams();
+        
+        HelperAssertions.assertTestSuiteResults( 1, 0, 0, 0, testDir );        
+    }
+}

Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Fri Nov 23 15:08:09 2007
@@ -0,0 +1,5 @@
+.classpath
+.project
+target
+.settings
+log.txt

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/pom.xml
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/pom.xml?rev=597756&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/pom.xml
(added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/pom.xml
Fri Nov 23 15:08:09 2007
@@ -0,0 +1,46 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+	<modelVersion>4.0.0</modelVersion>
+	<groupId>org.apache.maven.surefire.its</groupId>
+	<artifactId>surefire-162-charsetProvider</artifactId>
+	<name>Test alternate CharsetProvider</name>
+	<version>1.0-SNAPSHOT</version>
+	<build>
+		<plugins>
+			<plugin>
+				<artifactId>maven-compiler-plugin</artifactId>
+				<configuration>
+					<source>1.5</source>
+					<target>1.5</target>
+				</configuration>
+			</plugin>
+			<plugin>
+				<artifactId>maven-surefire-plugin</artifactId>
+				<configuration>
+					<forkMode>once</forkMode>
+					<useSystemClassLoader>true</useSystemClassLoader>
+				</configuration>
+			</plugin>
+		</plugins>
+	</build>
+	<dependencies>
+		<dependency>
+			<groupId>junit</groupId>
+			<artifactId>junit</artifactId>
+			<version>3.8.1</version>
+			<scope>test</scope>
+		</dependency>
+		<dependency>
+			<groupId>jcharset</groupId>
+			<artifactId>jcharset</artifactId>
+			<version>1.2.1</version>
+			<scope>runtime</scope>
+		</dependency>
+	</dependencies>
+	<repositories>
+		<repository>
+			<id>local</id>
+			<url>file://localhost/${basedir}/repo</url>
+		</repository>
+	</repositories>
+</project>

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/repo/jcharset/jcharset/1.2.1/jcharset-1.2.1.jar
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/repo/jcharset/jcharset/1.2.1/jcharset-1.2.1.jar?rev=597756&view=auto
==============================================================================
Binary file - no diff available.

Propchange: maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/repo/jcharset/jcharset/1.2.1/jcharset-1.2.1.jar
------------------------------------------------------------------------------
    svn:mime-type = application/octet-stream

Added: maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/src/test/java/MSUREFIRE77TestCase.java
URL: http://svn.apache.org/viewvc/maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/src/test/java/MSUREFIRE77TestCase.java?rev=597756&view=auto
==============================================================================
--- maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/src/test/java/MSUREFIRE77TestCase.java
(added)
+++ maven/surefire/trunk/surefire-integration-tests/src/test/resources/surefire-162-charsetProvider/src/test/java/MSUREFIRE77TestCase.java
Fri Nov 23 15:08:09 2007
@@ -0,0 +1,14 @@
+package uk.co.henriettasms;
+import java.io.UnsupportedEncodingException;
+
+import junit.framework.TestCase;
+
+public class MSUREFIRE77TestCase extends TestCase
+{
+	public void testThatICanUseCharsets() throws UnsupportedEncodingException
+	{
+		System.out.println( new String("foo".getBytes(), "GSM_0338"));
+	}
+
+        public static void main(String[] args) throws Exception { new MSUREFIRE77TestCase().testThatICanUseCharsets();
}
+}



Mime
View raw message