From 930f2f2030a279a8565becb92ecf5407d5972589 Mon Sep 17 00:00:00 2001 From: Antoine Levy-Lambert Date: Sat, 19 Jul 2003 15:57:21 +0000 Subject: [PATCH] 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 --- .../tools/ant/DirectoryScannerTest.java | 23 +++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java b/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java index b8e28c51e..1dee32b3f 100644 --- a/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java +++ b/src/testcases/org/apache/tools/ant/DirectoryScannerTest.java @@ -120,7 +120,11 @@ public class DirectoryScannerTest extends BuildFileTest { ds.setBasedir(new File(getProject().getBaseDir(), "tmp")); ds.setIncludes(new String[] {"alpha/beta/gamma/GAMMA.XML"}); 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() { @@ -129,8 +133,13 @@ public class DirectoryScannerTest extends BuildFileTest { ds.setBasedir(new File(getProject().getBaseDir(), "tmp")); ds.setIncludes(new String[] {"alpha/beta/gamma/GAMMA.XML"}); 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() { @@ -139,9 +148,15 @@ public class DirectoryScannerTest extends BuildFileTest { ds.setIncludes(new String[] {"ALPHA/"}); ds.setCaseSensitive(false); 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"}, new String[] {"alpha", "alpha/beta", "alpha/beta/gamma"}); + } } public void testAllowSymlinks() {