| <?xml version="1.0"?> |
| <!-- |
| Licensed to the Apache Software Foundation (ASF) under one or more |
| contributor license agreements. See the NOTICE file distributed with |
| this work for additional information regarding copyright ownership. |
| The ASF licenses this file to You under the Apache License, Version 2.0 |
| (the "License"); you may not use this file except in compliance with |
| the License. You may obtain a copy of the License at |
| |
| http://www.apache.org/licenses/LICENSE-2.0 |
| |
| Unless required by applicable law or agreed to in writing, software |
| distributed under the License is distributed on an "AS IS" BASIS, |
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| See the License for the specific language governing permissions and |
| limitations under the License. |
| --> |
| <project default="antunit" |
| xmlns:au="antlib:org.apache.ant.antunit" |
| xmlns:cmp="antlib:org.apache.ant.compress"> |
| |
| <import file="antunit-base.xml" /> |
| |
| <target name="setUp"> |
| <mkdir dir="${output}"/> |
| <mkdir dir="${input}"/> |
| </target> |
| |
| <target name="testAgainstAntlib7zTask" depends="setUp"> |
| <cmp:sevenz destfile="${input}/test.7z"> |
| <fileset dir="." includes="un7z-test.xml"/> |
| </cmp:sevenz> |
| <cmp:un7z src="${input}/test.7z" dest="${output}"/> |
| <au:assertFileExists file="${output}/un7z-test.xml"/> |
| <au:assertFilesMatch |
| actual="${output}/un7z-test.xml" |
| expected="un7z-test.xml" |
| /> |
| </target> |
| |
| <target name="testAgainstAntlib7zTaskLZMA2" depends="setUp"> |
| <cmp:sevenz destfile="${input}/test.7z" contentCompression="lzma2"> |
| <fileset dir="." includes="un7z-test.xml"/> |
| </cmp:sevenz> |
| <cmp:un7z src="${input}/test.7z" dest="${output}"/> |
| <au:assertFileExists file="${output}/un7z-test.xml"/> |
| <au:assertFilesMatch |
| actual="${output}/un7z-test.xml" |
| expected="un7z-test.xml" |
| /> |
| </target> |
| |
| <target name="testAgainstAntlib7zTaskBZIP2" depends="setUp"> |
| <cmp:sevenz destfile="${input}/test.7z" contentCompression="bzip2"> |
| <fileset dir="." includes="un7z-test.xml"/> |
| </cmp:sevenz> |
| <cmp:un7z src="${input}/test.7z" dest="${output}"/> |
| <au:assertFileExists file="${output}/un7z-test.xml"/> |
| <au:assertFilesMatch |
| actual="${output}/un7z-test.xml" |
| expected="un7z-test.xml" |
| /> |
| </target> |
| |
| <target name="testAgainstAntlib7zTaskDeflate" depends="setUp"> |
| <cmp:sevenz destfile="${input}/test.7z" contentCompression="deflate"> |
| <fileset dir="." includes="un7z-test.xml"/> |
| </cmp:sevenz> |
| <cmp:un7z src="${input}/test.7z" dest="${output}"/> |
| <au:assertFileExists file="${output}/un7z-test.xml"/> |
| <au:assertFilesMatch |
| actual="${output}/un7z-test.xml" |
| expected="un7z-test.xml" |
| /> |
| </target> |
| |
| <target name="testAgainstAntlib7zTaskCopy" depends="setUp"> |
| <cmp:sevenz destfile="${input}/test.7z" contentCompression="copy"> |
| <fileset dir="." includes="un7z-test.xml"/> |
| </cmp:sevenz> |
| <cmp:un7z src="${input}/test.7z" dest="${output}"/> |
| <au:assertFileExists file="${output}/un7z-test.xml"/> |
| <au:assertFilesMatch |
| actual="${output}/un7z-test.xml" |
| expected="un7z-test.xml" |
| /> |
| </target> |
| |
| <target name="testAgainstAntlib7zTaskDeltaPlusLZMA2" depends="setUp"> |
| <cmp:sevenz destfile="${input}/test.7z"> |
| <contentMethod method="delta_filter" option="2"/> |
| <contentMethod method="lzma2"/> |
| <fileset dir="." includes="un7z-test.xml"/> |
| </cmp:sevenz> |
| <cmp:un7z src="${input}/test.7z" dest="${output}"/> |
| <au:assertFileExists file="${output}/un7z-test.xml"/> |
| <au:assertFilesMatch |
| actual="${output}/un7z-test.xml" |
| expected="un7z-test.xml" |
| /> |
| </target> |
| |
| <target name="testAgainstNative7z" depends="setUp"> |
| <cmp:un7z src="../resources/asf-logo.gif.7z" dest="${output}" /> |
| <au:assertFileExists file="${output}/asf-logo.gif"/> |
| <au:assertFilesMatch |
| actual="${output}/asf-logo.gif" |
| expected="../resources/asf-logo.gif" |
| /> |
| </target> |
| |
| <target name="testAgainstNative7zDeflate64" depends="setUp"> |
| <cmp:un7z src="../resources/asf-logo.gif.deflate64.7z" dest="${output}" /> |
| <au:assertFileExists file="${output}/asf-logo.gif"/> |
| <au:assertFilesMatch |
| actual="${output}/asf-logo.gif" |
| expected="../resources/asf-logo.gif" |
| /> |
| </target> |
| </project> |