diff options
author | mattinger <[email protected]> | 2007-01-10 16:44:39 +0000 |
---|---|---|
committer | mattinger <[email protected]> | 2007-01-10 16:44:39 +0000 |
commit | 78dca04381301a66ee977808e4ee0bb3dc5a7290 (patch) | |
tree | d0abe5c24b277cd4059681b0bf70b7b8fac0da37 /test/antunit/property/propertycopy.xml | |
parent | 029cd4b9bc7d4b73f024b9191f2db44fd3edec32 (diff) |
first batch of antunit based test files.
git-svn-id: file:///home/sven/projects/JOGL/temp/ant-contrib/svn/ant-contrib-code/branches/ant-1.7.0-upgrade@70 32d7a393-a5a9-423c-abd3-5d954feb1f2f
Diffstat (limited to 'test/antunit/property/propertycopy.xml')
-rw-r--r-- | test/antunit/property/propertycopy.xml | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/test/antunit/property/propertycopy.xml b/test/antunit/property/propertycopy.xml new file mode 100644 index 0000000..87f5d6e --- /dev/null +++ b/test/antunit/property/propertycopy.xml @@ -0,0 +1,42 @@ +<project name="propertycopy" + xmlns:au="antlib:org.apache.ant.antunit" + xmlns:antcontrib="antlib:net.sf.antcontrib"> + <import file="../common.xml" /> + + <target name="testCopy"> + <property name="org" value="MyOrg" /> + <property name="org.MyOrg.DisplayName" value="My Organiziation" /> + <antcontrib:propertycopy name="displayName" from="org.${org}.DisplayName" /> + + <au:assertPropertyEquals name="displayName" + value="${org.MyOrg.DisplayName}" + message="displayName failed" /> + </target> + + <target name="testSilent"> + <antcontrib:propertycopy name="foo" from="bar" silent="true"/> + <au:assertTrue> + <not> + <isset property="foo" /> + </not> + </au:assertTrue> + </target> + + <target name="testNotSilent"> + <au:expectfailure expectedmessage="Property 'bar' is not defined."> + <antcontrib:propertycopy name="foo" from="bar"/> + </au:expectfailure> + </target> + + <target name="testMissingName"> + <au:expectfailure expectedmessage="You must specify a property to set."> + <antcontrib:propertycopy from="bar"/> + </au:expectfailure> + </target> + + <target name="testMissingFrom"> + <au:expectfailure expectedmessage="Missing the 'from' attribute."> + <antcontrib:propertycopy name="foo"/> + </au:expectfailure> + </target> +</project>
\ No newline at end of file |