|
@@ -8,7 +8,9 @@ |
|
|
|
|
|
import java.lang.reflect.Field; |
|
|
import java.net.URL; |
|
|
import java.util.ArrayList; |
|
|
import java.util.Arrays; |
|
|
import java.util.List; |
|
|
|
|
|
/** |
|
|
* @author Kohsuke Kawaguchi |
|
@@ -107,4 +109,22 @@ public void testProjectExport() throws Exception { |
|
|
new WebClient().goTo(p.getUrl() + "api/xml?depth=999", |
|
|
"application/xml"); |
|
|
} |
|
|
|
|
|
@Bug(14141) |
|
|
public void testFlattenEnabled() { |
|
|
List<CvsRepository> repositories = Arrays.asList(new CvsRepository("cvsroot", false, null, |
|
|
Arrays.asList(new CvsRepositoryItem(new CvsRepositoryLocation.HeadRepositoryLocation(), new CvsModule[]{new CvsModule("remoteName", "localName")})), new ArrayList<ExcludedRegion>(), 3)); |
|
|
CVSSCM scm = new CVSSCM(repositories, false, false, null, false, false, false, false); |
|
|
assertFalse(scm.isLegacy()); |
|
|
|
|
|
scm = new CVSSCM(repositories, false, true, null, false, false, false, false); |
|
|
assertTrue(scm.isLegacy()); |
|
|
|
|
|
repositories = Arrays.asList(new CvsRepository("cvsroot", false, null, |
|
|
Arrays.asList(new CvsRepositoryItem(new CvsRepositoryLocation.HeadRepositoryLocation(), new CvsModule[]{new CvsModule("remoteName", "localName"), new CvsModule("remoteName2", "localName2")})), new ArrayList<ExcludedRegion>(), 3)); |
|
|
|
|
|
scm = new CVSSCM(repositories, false, false, null, false, false, false, false); |
|
|
assertTrue(scm.isLegacy()); |
|
|
|
|
|
} |
|
|
} |