Added integration test to prove MNG-739 cannot be reproduced.

Btw, FIXME: should we, if just one include is given, take that
as the only include, or add it to the default include of **/*Test.java?


git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@232852 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Kenney Westerhof 2005-08-15 18:47:28 +00:00
parent 4de1c8c892
commit ef2ef62898
6 changed files with 71 additions and 0 deletions

View File

@ -0,0 +1,3 @@
touchFile.txt
testTouchFile.txt
defaultTestFile.txt

View File

@ -0,0 +1 @@
package

View File

@ -0,0 +1,32 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>org.apache.maven.it</groupId>
<artifactId>maven-it0050</artifactId>
<version>1.0-SNAPSHOT</version>
<dependencies>
<dependency>
<artifactId>junit</artifactId>
<groupId>junit</groupId>
<version>3.8.1</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<excludes>
<exclude implementation="java.lang.String">DontRunTest.*</exclude>
</excludes>
<includes>
<include implementation="java.lang.String">NotIncludedByDefault.java</include>
<include implementation="java.lang.String">*Test.java</include>
</includes>
</configuration>
</plugin>
</plugins>
</build>
</project>

View File

@ -0,0 +1,13 @@
import java.io.FileOutputStream;
public class DefaultTest
{
public void testRun()
throws Exception
{
FileOutputStream fout = new FileOutputStream("target/defaultTestTouchFile.txt");
fout.write('!');
fout.flush();
fout.close();
}
}

View File

@ -0,0 +1,9 @@
import junit.framework.TestCase;
public class DontRunTest extends TestCase
{
public void testRun()
{
assertEquals(true, false);
}
}

View File

@ -0,0 +1,13 @@
import java.io.FileOutputStream;
public class NotIncludedByDefault
{
public void testRun()
throws Exception
{
FileOutputStream fout = new FileOutputStream("target/testTouchFile.txt");
fout.write('!');
fout.flush();
fout.close();
}
}