here is another one, to be placed in maven-scm-api test suite
package org.apache.maven.scm;
import java.io.File;
import java.io.IOException;
import org.apache.maven.scm.ScmTestCase;
/**
* @author dtran
*/
public class ScmFileSetTest
extends ScmTestCase
{
public void testExcludes() throws IOException
{
String basedir = this.getBasedir();
ScmFileSet fileSet = new ScmFileSet( new File( basedir ),
null, "**/target/**" );
File [] files = fileSet.getFiles();
for ( int i = 0; i < files.length; ++i )
{
if ( files[i].getAbsolutePath().indexOf("target") != -1 )
{
fail("Found excludes in file set");
}
}
}
}
On 5/27/05, dan tran <[EMAIL PROTECTED]> wrote:
> Could someone validate this test case?
>
> package org.apache.maven.scm;
>
> import java.io.File;
> import java.io.IOException;
>
> import junit.framework.TestCase;
>
> public class ScmFileSetTest
> extends TestCase
> {
> public void testExcludes() throws IOException
> {
> ScmFileSet fileSet = new ScmFileSet( new File( "." ), null,
> "**/target/**" );
>
> File [] files = fileSet.getFiles();
>
> for ( int i = 0; i < files.length; ++i )
> {
> if ( files[i].getAbsolutePath().indexOf("target") != -1 )
> {
> fail("Found excludes in file set");
> }
> }
>
> }
> }
>