Browse Source

Demonstrate bug 18670

git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@274419 13f79535-47bb-0310-9956-ffa450edef68
master
Stefan Bodewig 22 years ago
parent
commit
b1de9ab9c1
2 changed files with 11 additions and 1 deletions
  1. +5
    -0
      src/etc/testcases/taskdefs/checksum.xml
  2. +6
    -1
      src/testcases/org/apache/tools/ant/taskdefs/ChecksumTest.java

+ 5
- 0
src/etc/testcases/taskdefs/checksum.xml View File

@@ -36,4 +36,9 @@
<checksum file="../asf-logo.gif" fileext=".md5" /> <checksum file="../asf-logo.gif" fileext=".md5" />
</condition> </condition>
</target> </target>

<target name="verifyFromProperty">
<checksum property="checksum" file="checksum.xml"/>
<checksum property="checksum" file="checksum.xml" verifyproperty="verify"/>
</target>
</project> </project>

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

@@ -1,7 +1,7 @@
/* /*
* The Apache Software License, Version 1.1 * The Apache Software License, Version 1.1
* *
* Copyright (c) 2001 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
@@ -102,6 +102,11 @@ public class ChecksumTest extends BuildFileTest {
assertNull(project.getProperty("no.logo.md5")); assertNull(project.getProperty("no.logo.md5"));
} }


public void testVerifyFromProperty() {
assertNull(getProject().getProperty("verify"));
expectPropertySet("verifyFromProperty", "verify", "true");
}

private void testVerify(String target) { private void testVerify(String target) {
assertNull(project.getProperty("logo.md5")); assertNull(project.getProperty("logo.md5"));
assertNull(project.getProperty("no.logo.md5")); assertNull(project.getProperty("no.logo.md5"));


Loading…
Cancel
Save