adjust tests to work even if they are exported from SVN rather than a checkout

git-svn-id: https://svn.apache.org/repos/asf/maven/archiva/trunk@447735 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Brett Porter 2006-09-19 05:09:52 +00:00
parent bfdad1b0f7
commit 04e602f652
4 changed files with 6 additions and 2 deletions

View File

@ -63,7 +63,7 @@ public class DefaultArtifactDiscovererTest
String path = dPath.getPath(); String path = dPath.getPath();
boolean b = path.indexOf( ".svn" ) >= 0; boolean b = path.indexOf( "CVS" ) >= 0;
if ( b ) if ( b )
{ {
found = true; found = true;
@ -75,6 +75,7 @@ public class DefaultArtifactDiscovererTest
for ( Iterator i = artifacts.iterator(); i.hasNext(); ) for ( Iterator i = artifacts.iterator(); i.hasNext(); )
{ {
Artifact a = (Artifact) i.next(); Artifact a = (Artifact) i.next();
assertFalse( "Check not CVS", a.getFile().getPath().indexOf( "CVS" ) >= 0 );
assertFalse( "Check not .svn", a.getFile().getPath().indexOf( ".svn" ) >= 0 ); assertFalse( "Check not .svn", a.getFile().getPath().indexOf( ".svn" ) >= 0 );
} }
} }

View File

@ -60,7 +60,7 @@ public class LegacyArtifactDiscovererTest
String path = dPath.getPath(); String path = dPath.getPath();
if ( path.indexOf( ".svn" ) >= 0 ) if ( path.indexOf( "CVS" ) >= 0 )
{ {
found = true; found = true;
assertEquals( "Check comment", "Artifact was in the specified list of exclusions", dPath.getComment() ); assertEquals( "Check comment", "Artifact was in the specified list of exclusions", dPath.getComment() );
@ -71,6 +71,7 @@ public class LegacyArtifactDiscovererTest
for ( Iterator i = artifacts.iterator(); i.hasNext(); ) for ( Iterator i = artifacts.iterator(); i.hasNext(); )
{ {
Artifact a = (Artifact) i.next(); Artifact a = (Artifact) i.next();
assertFalse( "Check not CVS", a.getFile().getPath().indexOf( "CVS" ) >= 0 );
assertFalse( "Check not .svn", a.getFile().getPath().indexOf( ".svn" ) >= 0 ); assertFalse( "Check not .svn", a.getFile().getPath().indexOf( ".svn" ) >= 0 );
} }
} }

View File

@ -0,0 +1 @@
not a real CVS root - for testing exclusions

View File

@ -0,0 +1 @@
not a real CVS root - for testing exclusions