From 5d443a11d97d54eac05047e20fccc3a6e8427a74 Mon Sep 17 00:00:00 2001 From: Stefan Bodewig Date: Sat, 29 Apr 2006 14:45:25 +0000 Subject: [PATCH] tests for PR 38973 git-svn-id: https://svn.apache.org/repos/asf/ant/core/trunk@398164 13f79535-47bb-0310-9956-ffa450edef68 --- src/etc/testcases/taskdefs/unzip.xml | 22 +++++++++++++++++++ .../apache/tools/ant/taskdefs/UnzipTest.java | 20 ++++++++++++++++- 2 files changed, 41 insertions(+), 1 deletion(-) diff --git a/src/etc/testcases/taskdefs/unzip.xml b/src/etc/testcases/taskdefs/unzip.xml index 0ee1d0da7..345568aa6 100644 --- a/src/etc/testcases/taskdefs/unzip.xml +++ b/src/etc/testcases/taskdefs/unzip.xml @@ -70,6 +70,28 @@ + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/testcases/org/apache/tools/ant/taskdefs/UnzipTest.java b/src/testcases/org/apache/tools/ant/taskdefs/UnzipTest.java index 6f5debc6f..ff6bf8512 100644 --- a/src/testcases/org/apache/tools/ant/taskdefs/UnzipTest.java +++ b/src/testcases/org/apache/tools/ant/taskdefs/UnzipTest.java @@ -1,5 +1,5 @@ /* - * Copyright 2000-2005 The Apache Software Foundation + * Copyright 2000-2006 The Apache Software Foundation * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. @@ -104,6 +104,24 @@ public class UnzipTest extends BuildFileTest { assertFileMissing("2/bar is excluded", "unziptestout/2/bar"); } + /* + * PR 38973 + */ + public void testTwoPatternSets() { + executeTarget("testTwoPatternSets"); + assertFileMissing("1/foo is not included", "unziptestout/1/foo"); + assertFileExists("2/bar is included", "unziptestout/2/bar"); + } + + /* + * PR 38973 + */ + public void testTwoPatternSetsWithExcludes() { + executeTarget("testTwoPatternSetsWithExcludes"); + assertFileMissing("1/foo is not included", "unziptestout/1/foo"); + assertFileMissing("2/bar is excluded", "unziptestout/2/bar"); + } + /* * PR 16213 */