68 lines
2.0 KiB
XML
68 lines
2.0 KiB
XML
<?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
|
|
|
|
https://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 xmlns:au="antlib:org.apache.ant.antunit" default="antunit">
|
|
|
|
<import file="antunit-base.xml"/>
|
|
|
|
<target name="test-yes">
|
|
<au:assertTrue>
|
|
<au:resourceExists>
|
|
<file file="resourceexists-test.xml"/>
|
|
</au:resourceExists>
|
|
</au:assertTrue>
|
|
</target>
|
|
|
|
<target name="test-refid-file">
|
|
<file file="resourceexists-test.xml" id="id1"/>
|
|
<au:assertTrue>
|
|
<au:resourceExists refid="id1"/>
|
|
</au:assertTrue>
|
|
</target>
|
|
|
|
<target name="test-refid-fileset">
|
|
<fileset file="resourceexists-test.xml" id="id2"/>
|
|
<au:assertTrue>
|
|
<au:resourceExists refid="id2"/>
|
|
</au:assertTrue>
|
|
</target>
|
|
|
|
<target name="test-no">
|
|
<au:assertFalse>
|
|
<au:resourceExists>
|
|
<file file="resourceexists-test-not-there.xml"/>
|
|
</au:resourceExists>
|
|
</au:assertFalse>
|
|
</target>
|
|
|
|
<target name="testURL">
|
|
<au:assertTrue>
|
|
<au:resourceExists>
|
|
<url url="https://ant.apache.org/index.html"/>
|
|
</au:resourceExists>
|
|
</au:assertTrue>
|
|
</target>
|
|
|
|
<target name="testURLAttributeUsingRef">
|
|
<url url="https://ant.apache.org/index.html" id="antsite"/>
|
|
<au:assertTrue>
|
|
<au:resourceExists resource="${ant.refid:antsite}"/>
|
|
</au:assertTrue>
|
|
</target>
|
|
|
|
</project>
|