aboutsummaryrefslogtreecommitdiffstats
path: root/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/taskdefs/local-test.xml
diff options
context:
space:
mode:
authorAshlee Young <ashlee@onosfw.com>2015-10-23 10:00:02 -0700
committerAshlee Young <ashlee@onosfw.com>2015-10-23 10:00:02 -0700
commit753a6c60f47f3ac4f270005b65e9d6481de8eb68 (patch)
tree3d0a1ae3b4d994550f6614b417b991eee3eb8911 /framework/src/ant/apache-ant-1.9.6/src/tests/antunit/taskdefs/local-test.xml
parentc62d20eb3b4620c06d833be06f50b2600d96dd42 (diff)
Adding maven and ant source trees
Change-Id: I0a39b9add833a31b9c3f98d193983ae2f3a5a445 Signed-off-by: Ashlee Young <ashlee@onosfw.com>
Diffstat (limited to 'framework/src/ant/apache-ant-1.9.6/src/tests/antunit/taskdefs/local-test.xml')
-rw-r--r--framework/src/ant/apache-ant-1.9.6/src/tests/antunit/taskdefs/local-test.xml96
1 files changed, 96 insertions, 0 deletions
diff --git a/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/taskdefs/local-test.xml b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/taskdefs/local-test.xml
new file mode 100644
index 00000000..9c4e7b7e
--- /dev/null
+++ b/framework/src/ant/apache-ant-1.9.6/src/tests/antunit/taskdefs/local-test.xml
@@ -0,0 +1,96 @@
+<?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">
+ <import file="../antunit-base.xml" />
+
+ <property name="foo" value="foo" />
+
+ <local name="bar" />
+ <property name="bar" value="bar" />
+ <au:assertPropertyEquals name="bar" value="bar" />
+
+ <target name="testGlobalLocal">
+ <au:assertFalse>
+ <isset property="bar" />
+ </au:assertFalse>
+ </target>
+
+ <target name="testBaseline">
+ <au:assertPropertyEquals name="foo" value="foo" />
+ </target>
+
+ <target name="testTarget">
+ <au:assertPropertyEquals name="foo" value="foo" />
+ <local name="foo" />
+ <property name="foo" value="foo.target" />
+ <au:assertPropertyEquals name="foo" value="foo.target" />
+ </target>
+
+ <target name="testSequential">
+ <sequential>
+ <local name="foo" />
+ <property name="foo" value="foo.1" />
+ <sequential>
+ <local name="foo" />
+ <property name="foo" value="foo.2" />
+ <au:assertPropertyEquals name="foo" value="foo.2" />
+ </sequential>
+ <au:assertPropertyEquals name="foo" value="foo.1" />
+ </sequential>
+ <au:assertPropertyEquals name="foo" value="foo" />
+ </target>
+
+ <target name="testParallel">
+ <macrodef name="p">
+ <attribute name="value" />
+ <attribute name="sleep" default="0" />
+ <sequential>
+ <local name="foo" />
+ <sleep seconds="@{sleep}" />
+ <property name="foo" value="@{value}" />
+ <au:assertPropertyEquals name="foo" value="@{value}" />
+ </sequential>
+ </macrodef>
+ <parallel>
+ <p sleep="2" value="foo.a" />
+ <au:assertPropertyEquals name="foo" value="foo" />
+ <p sleep="1" value="foo.b" />
+ <au:assertPropertyEquals name="foo" value="foo" />
+ <p sleep="0" value="foo.c" />
+ <au:assertPropertyEquals name="foo" value="foo" />
+ </parallel>
+ <au:assertPropertyEquals name="foo" value="foo" />
+ </target>
+
+ <target name="testMacrodef">
+ <macrodef name="m">
+ <sequential>
+ <local name="foo" />
+ <property name="foo" value="foo.x" />
+ <au:assertPropertyEquals name="foo" value="foo.x" />
+ </sequential>
+ </macrodef>
+ <m />
+ <au:assertPropertyEquals name="foo" value="foo" />
+ <m />
+ <au:assertPropertyEquals name="foo" value="foo" />
+ <m />
+ <au:assertPropertyEquals name="foo" value="foo" />
+ </target>
+
+</project>