git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274228 13f79535-47bb-0310-9956-ffa450edef68master
@@ -2,12 +2,16 @@ | |||||
<project basedir="." default="cleanup"> | <project basedir="." default="cleanup"> | ||||
<target name="realTest" depends="cleanup"> | |||||
<target name="realTest"> | |||||
<bunzip2 src="expected/asf-logo-huge.tar.bz2" dest="asf-logo-huge.tar" /> | <bunzip2 src="expected/asf-logo-huge.tar.bz2" dest="asf-logo-huge.tar" /> | ||||
</target> | </target> | ||||
<target name="cleanup"> | <target name="cleanup"> | ||||
<delete file="asf-logo-huge.tar" /> | <delete file="asf-logo-huge.tar" /> | ||||
<delete file="expected/asf-logo-huge.tar" /> | |||||
</target> | </target> | ||||
<target name="prepare"> | |||||
<gunzip src="expected/asf-logo-huge.tar.gz"/> | |||||
</target> | |||||
</project> | </project> |
@@ -2,11 +2,11 @@ | |||||
<project basedir="." default="cleanup"> | <project basedir="." default="cleanup"> | ||||
<target name="realTest" depends="cleanup"> | |||||
<target name="realTest"> | |||||
<bzip2 src="expected/asf-logo-huge.tar" zipfile="asf-logo-huge.tar.bz2" /> | <bzip2 src="expected/asf-logo-huge.tar" zipfile="asf-logo-huge.tar.bz2" /> | ||||
</target> | </target> | ||||
<target name="testDateCheck" depends="cleanup"> | |||||
<target name="testDateCheck"> | |||||
<touch file="asf-logo.gif.bz2"/> | <touch file="asf-logo.gif.bz2"/> | ||||
<bzip2 src="../asf-logo.gif" zipfile="asf-logo.gif.bz2" /> | <bzip2 src="../asf-logo.gif" zipfile="asf-logo.gif.bz2" /> | ||||
</target> | </target> | ||||
@@ -14,6 +14,10 @@ | |||||
<target name="cleanup"> | <target name="cleanup"> | ||||
<delete file="asf-logo-huge.tar.bz2" /> | <delete file="asf-logo-huge.tar.bz2" /> | ||||
<delete file="asf-logo.gif.bz2" /> | <delete file="asf-logo.gif.bz2" /> | ||||
<delete file="expected/asf-logo-huge.tar"/> | |||||
</target> | </target> | ||||
<target name="prepare"> | |||||
<gunzip src="expected/asf-logo-huge.tar.gz"/> | |||||
</target> | |||||
</project> | </project> |
@@ -26,8 +26,8 @@ | |||||
tofile="${test.dir}/zip/asf-logo.gif.zip" /> | tofile="${test.dir}/zip/asf-logo.gif.zip" /> | ||||
<copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.tar" | <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.tar" | ||||
tofile="${test.dir}/tar/asf-logo.gif.tar" /> | tofile="${test.dir}/tar/asf-logo.gif.tar" /> | ||||
<copy file="${etc.dir}/taskdefs/expected/asf-logo-huge.tar" | |||||
tofile="${test.dir}/tar/asf-logo-huge.tar" /> | |||||
<copy file="${etc.dir}/taskdefs/expected/asf-logo-huge.tar.gz" | |||||
tofile="${test.dir}/tar/asf-logo-huge.tar.gz" /> | |||||
<copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.tar.gz" | <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.tar.gz" | ||||
tofile="${test.dir}/tar/gz/asf-logo.gif.tar.gz" /> | tofile="${test.dir}/tar/gz/asf-logo.gif.tar.gz" /> | ||||
<copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.tar.bz2" | <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.tar.bz2" | ||||
@@ -51,7 +51,7 @@ | |||||
datetime="05/10/2002 2:30 PM"/> | datetime="05/10/2002 2:30 PM"/> | ||||
<touch file="${test.dir}/tar/asf-logo.gif.tar" | <touch file="${test.dir}/tar/asf-logo.gif.tar" | ||||
datetime="05/10/2002 2:29 PM"/> | datetime="05/10/2002 2:29 PM"/> | ||||
<touch file="${test.dir}/tar/asf-logo-huge.tar" | |||||
<touch file="${test.dir}/tar/asf-logo-huge.tar.gz" | |||||
datetime="05/10/2002 2:29 AM"/> | datetime="05/10/2002 2:29 AM"/> | ||||
</target> | </target> | ||||
@@ -72,7 +72,7 @@ | |||||
<sleep seconds="3"/> | <sleep seconds="3"/> | ||||
<touch file="${mirror.dir}/tar/asf-logo.gif.tar"/> | <touch file="${mirror.dir}/tar/asf-logo.gif.tar"/> | ||||
<sleep seconds="2"/> | <sleep seconds="2"/> | ||||
<touch file="${mirror.dir}/tar/asf-logo-huge.tar"/> | |||||
<touch file="${mirror.dir}/tar/asf-logo-huge.tar.gz"/> | |||||
<touch file="${mirror.dir}/tar/gz/asf-logo.gif.tar.gz"/> | <touch file="${mirror.dir}/tar/gz/asf-logo.gif.tar.gz"/> | ||||
<touch file="${mirror.dir}/tar/bz2/asf-logo.gif.tar.bz2"/> | <touch file="${mirror.dir}/tar/bz2/asf-logo.gif.tar.bz2"/> | ||||
<touch file="${mirror.dir}/tar/bz2/asf-logo-huge.tar.bz2"/> | <touch file="${mirror.dir}/tar/bz2/asf-logo-huge.tar.bz2"/> | ||||
@@ -1,7 +1,7 @@ | |||||
/* | /* | ||||
* The Apache Software License, Version 1.1 | * The Apache Software License, Version 1.1 | ||||
* | * | ||||
* Copyright (c) 2001-2002 The Apache Software Foundation. All rights | |||||
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights | |||||
* reserved. | * reserved. | ||||
* | * | ||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
@@ -71,6 +71,7 @@ public class BUnzip2Test extends BuildFileTest { | |||||
public void setUp() { | public void setUp() { | ||||
configureProject("src/etc/testcases/taskdefs/bunzip2.xml"); | configureProject("src/etc/testcases/taskdefs/bunzip2.xml"); | ||||
executeTarget("prepare"); | |||||
} | } | ||||
public void tearDown() { | public void tearDown() { | ||||
@@ -1,7 +1,7 @@ | |||||
/* | /* | ||||
* The Apache Software License, Version 1.1 | * The Apache Software License, Version 1.1 | ||||
* | * | ||||
* Copyright (c) 2001-2002 The Apache Software Foundation. All rights | |||||
* Copyright (c) 2001-2003 The Apache Software Foundation. All rights | |||||
* reserved. | * reserved. | ||||
* | * | ||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
@@ -71,6 +71,7 @@ public class BZip2Test extends BuildFileTest { | |||||
public void setUp() { | public void setUp() { | ||||
configureProject("src/etc/testcases/taskdefs/bzip2.xml"); | configureProject("src/etc/testcases/taskdefs/bzip2.xml"); | ||||
executeTarget("prepare"); | |||||
} | } | ||||
public void tearDown() { | public void tearDown() { | ||||
@@ -1,7 +1,7 @@ | |||||
/* | /* | ||||
* The Apache Software License, Version 1.1 | * The Apache Software License, Version 1.1 | ||||
* | * | ||||
* Copyright (c) 2000-2002 The Apache Software Foundation. All rights | |||||
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights | |||||
* reserved. | * reserved. | ||||
* | * | ||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
@@ -82,7 +82,7 @@ public abstract class BaseSelectorTest extends TestCase { | |||||
protected File mirrordir = new File(mirrordirname); | protected File mirrordir = new File(mirrordirname); | ||||
protected String[] filenames = {".","asf-logo.gif.md5","asf-logo.gif.bz2", | protected String[] filenames = {".","asf-logo.gif.md5","asf-logo.gif.bz2", | ||||
"asf-logo.gif.gz","copy.filterset.filtered","zip/asf-logo.gif.zip", | "asf-logo.gif.gz","copy.filterset.filtered","zip/asf-logo.gif.zip", | ||||
"tar/asf-logo.gif.tar","tar/asf-logo-huge.tar", | |||||
"tar/asf-logo.gif.tar","tar/asf-logo-huge.tar.gz", | |||||
"tar/gz/asf-logo.gif.tar.gz","tar/bz2/asf-logo.gif.tar.bz2", | "tar/gz/asf-logo.gif.tar.gz","tar/bz2/asf-logo.gif.tar.bz2", | ||||
"tar/bz2/asf-logo-huge.tar.bz2","tar/bz2"}; | "tar/bz2/asf-logo-huge.tar.bz2","tar/bz2"}; | ||||
protected File[] files = new File[filenames.length]; | protected File[] files = new File[filenames.length]; | ||||
@@ -1,7 +1,7 @@ | |||||
/* | /* | ||||
* The Apache Software License, Version 1.1 | * The Apache Software License, Version 1.1 | ||||
* | * | ||||
* Copyright (c) 2000-2002 The Apache Software Foundation. All rights | |||||
* Copyright (c) 2000-2003 The Apache Software Foundation. All rights | |||||
* reserved. | * reserved. | ||||
* | * | ||||
* Redistribution and use in source and binary forms, with or without | * Redistribution and use in source and binary forms, with or without | ||||
@@ -140,13 +140,13 @@ public class FilenameSelectorTest extends BaseSelectorTest { | |||||
s.setName("**/*.gz"); | s.setName("**/*.gz"); | ||||
s.setNegate(true); | s.setNegate(true); | ||||
results = selectionString(s); | results = selectionString(s); | ||||
assertEquals("TTTFTTTTFTTT", results); | |||||
assertEquals("TTTFTTTFFTTT", results); | |||||
s = (FilenameSelector)getInstance(); | s = (FilenameSelector)getInstance(); | ||||
s.setName("**/*.GZ"); | s.setName("**/*.GZ"); | ||||
s.setCasesensitive(false); | s.setCasesensitive(false); | ||||
results = selectionString(s); | results = selectionString(s); | ||||
assertEquals("FFFTFFFFTFFF", results); | |||||
assertEquals("FFFTFFFTTFFF", results); | |||||
s = (FilenameSelector)getInstance(); | s = (FilenameSelector)getInstance(); | ||||
Parameter param1 = new Parameter(); | Parameter param1 = new Parameter(); | ||||