Author: bodewig Date: Sun Aug 23 06:14:55 2009 New Revision: 806934 URL: http://svn.apache.org/viewvc?rev=806934&view=rev Log: tests for directoriy permissions
Modified: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/ar-test.xml ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tar-test.xml ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zip-test.xml Modified: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/ar-test.xml URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/ar-test.xml?rev=806934&r1=806933&r2=806934&view=diff ============================================================================== --- ant/sandbox/antlibs/compress/trunk/src/tests/antunit/ar-test.xml (original) +++ ant/sandbox/antlibs/compress/trunk/src/tests/antunit/ar-test.xml Sun Aug 23 06:14:55 2009 @@ -153,7 +153,8 @@ </target> <target name="testWithDirectories" depends="setUp"> - <au:expectfailure> + <au:expectfailure + message="ar archives cannot store directory entries"> <cmp:ar destfile="${dest}" filesonly="false"> <dirset dir="${input}" excludes="."/> </cmp:ar> @@ -161,7 +162,17 @@ </target> <target name="testWithImplicitDirectories" depends="setUp"> - <au:expectfailure> + <au:expectfailure + message="ar archives cannot store directory entries"> + <cmp:ar destfile="${dest}" filesonly="false"> + <fileset dir="${input}"/> + </cmp:ar> + </au:expectfailure> + </target> + + <target name="testImplicitDirectoriesUsePermissions" depends="setUp"> + <au:expectfailure + message="ar archives cannot store directory entries"> <cmp:ar destfile="${dest}" filesonly="false"> <fileset dir="${input}"/> </cmp:ar> Modified: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml?rev=806934&r1=806933&r2=806934&view=diff ============================================================================== --- ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml (original) +++ ant/sandbox/antlibs/compress/trunk/src/tests/antunit/cpio-test.xml Sun Aug 23 06:14:55 2009 @@ -161,6 +161,13 @@ <file file="${dest}"/> </cmp:cpioentry> </assertResourceExists> + <au:assertTrue> + <cmp:hasmode mode="755"> + <cmp:cpioentry name="subdir/"> + <file file="${dest}"/> + </cmp:cpioentry> + </cmp:hasmode> + </au:assertTrue> <assertResourceDoesntExist> <cmp:cpioentry name="subdir/asf-logo.gif"> <file file="${dest}"/> @@ -177,10 +184,30 @@ <file file="${dest}"/> </cmp:cpioentry> </assertResourceExists> + <au:assertTrue> + <cmp:hasmode mode="755"> + <cmp:cpioentry name="subdir/"> + <file file="${dest}"/> + </cmp:cpioentry> + </cmp:hasmode> + </au:assertTrue> <assertResourceExists> <cmp:cpioentry name="subdir/asf-logo.gif"> <file file="${dest}"/> </cmp:cpioentry> </assertResourceExists> </target> + + <target name="testImplicitDirectoriesUsePermissions" depends="setUp"> + <cmp:cpio destfile="${dest}" filesonly="false"> + <zipfileset dir="${input}" dirmode="750"/> + </cmp:cpio> + <au:assertTrue> + <cmp:hasmode mode="750"> + <cmp:cpioentry name="subdir/"> + <file file="${dest}"/> + </cmp:cpioentry> + </cmp:hasmode> + </au:assertTrue> + </target> </project> Modified: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tar-test.xml URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tar-test.xml?rev=806934&r1=806933&r2=806934&view=diff ============================================================================== --- ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tar-test.xml (original) +++ ant/sandbox/antlibs/compress/trunk/src/tests/antunit/tar-test.xml Sun Aug 23 06:14:55 2009 @@ -177,6 +177,13 @@ <file file="${dest}"/> </cmp:tarentry> </assertResourceExists> + <au:assertTrue> + <cmp:hasmode mode="755"> + <cmp:tarentry name="subdir/"> + <file file="${dest}"/> + </cmp:tarentry> + </cmp:hasmode> + </au:assertTrue> <assertResourceDoesntExist> <cmp:tarentry name="subdir/asf-logo.gif"> <file file="${dest}"/> @@ -193,10 +200,30 @@ <file file="${dest}"/> </cmp:tarentry> </assertResourceExists> + <au:assertTrue> + <cmp:hasmode mode="755"> + <cmp:tarentry name="subdir/"> + <file file="${dest}"/> + </cmp:tarentry> + </cmp:hasmode> + </au:assertTrue> <assertResourceExists> <cmp:tarentry name="subdir/asf-logo.gif"> <file file="${dest}"/> </cmp:tarentry> </assertResourceExists> </target> + + <target name="testImplicitDirectoriesUsePermissions" depends="setUp"> + <cmp:tar destfile="${dest}" filesonly="false"> + <zipfileset dir="${input}" dirmode="750"/> + </cmp:tar> + <au:assertTrue> + <cmp:hasmode mode="750"> + <cmp:tarentry name="subdir/"> + <file file="${dest}"/> + </cmp:tarentry> + </cmp:hasmode> + </au:assertTrue> + </target> </project> Modified: ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zip-test.xml URL: http://svn.apache.org/viewvc/ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zip-test.xml?rev=806934&r1=806933&r2=806934&view=diff ============================================================================== --- ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zip-test.xml (original) +++ ant/sandbox/antlibs/compress/trunk/src/tests/antunit/zip-test.xml Sun Aug 23 06:14:55 2009 @@ -145,6 +145,13 @@ <file file="${dest}"/> </cmp:zipentry> </assertResourceExists> + <au:assertTrue> + <cmp:hasmode mode="755"> + <cmp:zipentry name="subdir/"> + <file file="${dest}"/> + </cmp:zipentry> + </cmp:hasmode> + </au:assertTrue> <assertResourceDoesntExist> <cmp:zipentry name="subdir/asf-logo.gif"> <file file="${dest}"/> @@ -161,10 +168,30 @@ <file file="${dest}"/> </cmp:zipentry> </assertResourceExists> + <au:assertTrue> + <cmp:hasmode mode="755"> + <cmp:zipentry name="subdir/"> + <file file="${dest}"/> + </cmp:zipentry> + </cmp:hasmode> + </au:assertTrue> <assertResourceExists> <cmp:zipentry name="subdir/asf-logo.gif"> <file file="${dest}"/> </cmp:zipentry> </assertResourceExists> </target> + + <target name="testImplicitDirectoriesUsePermissions" depends="setUp"> + <cmp:zip destfile="${dest}" filesonly="false"> + <zipfileset dir="${input}" dirmode="750"/> + </cmp:zip> + <au:assertTrue> + <cmp:hasmode mode="750"> + <cmp:zipentry name="subdir/"> + <file file="${dest}"/> + </cmp:zipentry> + </cmp:hasmode> + </au:assertTrue> + </target> </project>