Browse Source

make the new tests involving case sensitivity or not pass on Windows

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274864 13f79535-47bb-0310-9956-ffa450edef68
master
Antoine Levy-Lambert 22 years ago
parent
commit
930f2f2030
1 changed files with 19 additions and 4 deletions
  1. +19
    -4
      src/testcases/org/apache/tools/ant/DirectoryScannerTest.java

+ 19
- 4
src/testcases/org/apache/tools/ant/DirectoryScannerTest.java View File

@@ -120,7 +120,11 @@ public class DirectoryScannerTest extends BuildFileTest {
ds.setBasedir(new File(getProject().getBaseDir(), "tmp")); ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
ds.setIncludes(new String[] {"alpha/beta/gamma/GAMMA.XML"}); ds.setIncludes(new String[] {"alpha/beta/gamma/GAMMA.XML"});
ds.scan(); ds.scan();
compareFiles(ds, new String[] {}, new String[] {});
if (Os.isFamily("dos")) {
compareFiles(ds, new String[] {"alpha/beta/gamma/GAMMA.XML"}, new String[] {});
} else {
compareFiles(ds, new String[] {}, new String[] {});
}
} }


public void testFullPathMatchesCaseInsensitive() { public void testFullPathMatchesCaseInsensitive() {
@@ -129,8 +133,13 @@ public class DirectoryScannerTest extends BuildFileTest {
ds.setBasedir(new File(getProject().getBaseDir(), "tmp")); ds.setBasedir(new File(getProject().getBaseDir(), "tmp"));
ds.setIncludes(new String[] {"alpha/beta/gamma/GAMMA.XML"}); ds.setIncludes(new String[] {"alpha/beta/gamma/GAMMA.XML"});
ds.scan(); ds.scan();
compareFiles(ds, new String[] {"alpha/beta/gamma/gamma.xml"},
new String[] {});
if (Os.isFamily("dos")) {
compareFiles(ds, new String[] {"alpha/beta/gamma/GAMMA.XML"},
new String[] {});
} else {
compareFiles(ds, new String[] {"alpha/beta/gamma/gamma.xml"},
new String[] {});
}
} }


public void test2ButCaseInsesitive() { public void test2ButCaseInsesitive() {
@@ -139,9 +148,15 @@ public class DirectoryScannerTest extends BuildFileTest {
ds.setIncludes(new String[] {"ALPHA/"}); ds.setIncludes(new String[] {"ALPHA/"});
ds.setCaseSensitive(false); ds.setCaseSensitive(false);
ds.scan(); ds.scan();
compareFiles(ds, new String[] {"alpha/beta/beta.xml",
if (Os.isFamily("dos")) {
compareFiles(ds, new String[] {"ALPHA/beta/beta.xml",
"ALPHA/beta/gamma/gamma.xml"},
new String[] {"ALPHA", "ALPHA/beta", "ALPHA/beta/gamma"});
} else {
compareFiles(ds, new String[] {"alpha/beta/beta.xml",
"alpha/beta/gamma/gamma.xml"}, "alpha/beta/gamma/gamma.xml"},
new String[] {"alpha", "alpha/beta", "alpha/beta/gamma"}); new String[] {"alpha", "alpha/beta", "alpha/beta/gamma"});
}
} }


public void testAllowSymlinks() { public void testAllowSymlinks() {


Loading…
Cancel
Save