628
|
1 |
<?xml version="1.0"?>
|
|
2 |
<!--
|
|
3 |
============================================================================
|
|
4 |
Name : test_diamonds.ant.xml
|
|
5 |
Part of : Helium AntLib
|
|
6 |
|
|
7 |
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
|
8 |
All rights reserved.
|
|
9 |
This component and the accompanying materials are made available
|
|
10 |
under the terms of the License "Eclipse Public License v1.0"
|
|
11 |
which accompanies this distribution, and is available
|
|
12 |
at the URL "http://www.eclipse.org/legal/epl-v10.html".
|
|
13 |
|
|
14 |
Initial Contributors:
|
|
15 |
Nokia Corporation - initial contribution.
|
|
16 |
|
|
17 |
Contributors:
|
|
18 |
|
|
19 |
Description:
|
|
20 |
|
|
21 |
============================================================================
|
|
22 |
-->
|
|
23 |
<project name="test-environment" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
|
|
24 |
<description>Helium Antlib environment unittests.</description>
|
|
25 |
|
|
26 |
<typedef resource="com/nokia/helium/environment/ant/antlib.xml" uri="http://www.nokia.com/helium" />
|
|
27 |
|
|
28 |
|
|
29 |
<target name="test-environment">
|
|
30 |
<hlm:environment output="tools.xml">
|
|
31 |
<hlm:envdata>
|
|
32 |
<hlm:executable name="java" versionArgs="-version" versionRegex="java version "(\S+)\""/>
|
|
33 |
<hlm:executable name="ant" versionArgs="-badarg" versionRegex="Apache Ant version (\S+)"/>
|
|
34 |
</hlm:envdata>
|
|
35 |
</hlm:environment>
|
|
36 |
<au:assertFileExists file="tools.xml"/>
|
|
37 |
<loadfile srcfile="tools.xml" property="tools.xml.text"/>
|
|
38 |
<au:assertMatches string="${tools.xml.text}" pattern="1\.6" multiline="true" casesensitive="false"/>
|
|
39 |
<au:assertMatches string="${tools.xml.text}" pattern="bin[\\/]java" multiline="true" casesensitive="false"/>
|
|
40 |
<au:assertMatches string="${tools.xml.text}" pattern="length>\d+</length" multiline="true" casesensitive="false"/>
|
|
41 |
<au:assertMatches string="${tools.xml.text}" pattern="bin[\\/]ant" multiline="true" casesensitive="false"/>
|
|
42 |
<delete file="tools.xml"/>
|
|
43 |
</target>
|
|
44 |
|
|
45 |
|
|
46 |
</project>
|
|
47 |
|
|
48 |
|
|
49 |
|
|
50 |
|
|
51 |
|