Browse Source

assert that gzip's new uptodate check also affects bzip2.

2002


git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@271575 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 23 years ago
parent
commit
72f4f0b5a4
4 changed files with 18 additions and 3 deletions
  1. +6
    -0
      src/etc/testcases/taskdefs/bzip2.xml
  2. +1
    -1
      src/main/org/apache/tools/ant/taskdefs/Pack.java
  3. +10
    -1
      src/testcases/org/apache/tools/ant/taskdefs/BZip2Test.java
  4. +1
    -1
      src/testcases/org/apache/tools/ant/taskdefs/GzipTest.java

+ 6
- 0
src/etc/testcases/taskdefs/bzip2.xml View File

@@ -6,8 +6,14 @@
<bzip2 src="expected/asf-logo-huge.tar" zipfile="asf-logo-huge.tar.bz2" />
</target>

<target name="testDateCheck">
<touch file="asf-logo.gif.bz2"/>
<bzip2 src="../asf-logo.gif" zipfile="asf-logo.gif.bz2" />
</target>

<target name="cleanup">
<delete file="asf-logo-huge.tar.bz2" />
<delete file="asf-logo.gif.bz2" />
</target>

</project>

+ 1
- 1
src/main/org/apache/tools/ant/taskdefs/Pack.java View File

@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001 The Apache Software Foundation. All rights
* Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without


+ 10
- 1
src/testcases/org/apache/tools/ant/taskdefs/BZip2Test.java View File

@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2001 The Apache Software Foundation. All rights
* Copyright (c) 2001-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -83,4 +83,13 @@ public class BZip2Test extends BuildFileTest {
assertTrue(fileUtils.contentEquals(project.resolveFile("expected/asf-logo-huge.tar.bz2"),
project.resolveFile("asf-logo-huge.tar.bz2")));
}

public void testDateCheck(){
executeTarget("testDateCheck");
String log = getLog();
assertTrue(
"Expecting message ending with 'asf-logo.gif.bz2 is up to date.' but got '" + log + "'",
log.endsWith("asf-logo.gif.bz2 is up to date."));
}

}

+ 1
- 1
src/testcases/org/apache/tools/ant/taskdefs/GzipTest.java View File

@@ -1,7 +1,7 @@
/*
* The Apache Software License, Version 1.1
*
* Copyright (c) 2000-2001 The Apache Software Foundation. All rights
* Copyright (c) 2000-2002 The Apache Software Foundation. All rights
* reserved.
*
* Redistribution and use in source and binary forms, with or without


Loading…
Cancel
Save