buildframework/helium/sf/java/antlint/tests/antunit/test_antlint.ant.xml
author wbernard
Fri, 13 Aug 2010 14:59:05 +0300
changeset 628 7c4a911dc066
parent 588 c7c26511138f
child 645 b8d81fa19e7d
permissions -rw-r--r--
helium_11.0.0-e00f171ca185
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     1
<?xml version="1.0" encoding="UTF-8"?>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     2
<!-- 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     3
============================================================================ 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     4
Name        : test_antlint.ant.xml 
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     5
Part of     : Helium AntLib
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     6
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     7
Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies).
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     8
All rights reserved.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
     9
This component and the accompanying materials are made available
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    10
under the terms of the License "Eclipse Public License v1.0"
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    11
which accompanies this distribution, and is available
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    12
at the URL "http://www.eclipse.org/legal/epl-v10.html".
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    13
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    14
Initial Contributors:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    15
Nokia Corporation - initial contribution.
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    16
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    17
Contributors:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    18
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    19
Description:
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    20
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    21
============================================================================
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    22
-->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    23
<project name="test-antlint" xmlns:au="antlib:org.apache.ant.antunit" xmlns:hlm="http://www.nokia.com/helium">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    24
    <description>Helium Antlib AntLint unittests.</description>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    25
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    26
    <dirname property="antlint.test.dir" file="${ant.file.test-antlint}/.."/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    27
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    28
    <import file="${antlint.test.dir}/data/sample.ant.xml" />
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    29
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    30
    <taskdef resource="com/nokia/helium/antlint/ant/antlib.xml" uri="http://www.nokia.com/helium"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    31
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    32
    <property name="data.model.parsed" location="${antlint.test.dir}/data/datamodel.out"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    33
    
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    34
    <!-- is called prior to the test -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    35
    <target name="setUp">
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    36
        <delete dir="${antlint.test.dir}/data/output" failonerror="false" />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    37
        <mkdir dir="${antlint.test.dir}/data/output" />
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    38
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    39
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    40
    <!-- is called after the test, even if that caused an error -->
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    41
    <target name="tearDown">
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    42
        <delete dir="${antlint.test.dir}/data/output" failonerror="false" />
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    43
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    44
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    45
    <target name="test-check-tab-character">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    46
        <hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    47
            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    48
                <include name="build.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    49
            </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    50
            <hlm:checkTabCharacter severity="warning" enabled="true"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    51
        </hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    52
        <au:assertLogContains text="WARNING: 25: Tabs should not be used!" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    53
        <au:assertLogContains text="WARNING: 29: Tabs should not be used!" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    54
    </target>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
    55
    
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    56
    <target name="test-check-property-name">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    57
        <hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    58
            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    59
                <include name="sample.ant.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    60
            </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    61
            <hlm:checkPropertyName severity="warning" enabled="true" regexp="([a-z0-9[\\d\\_\\.\\@\\{\\}\\$]]*)" />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    62
        </hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    63
        <au:assertLogContains text="WARNING: INVALID Property Name: check-property-name" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    64
    </target>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    65
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    66
    <target name="test-check-target-name">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    67
        <hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    68
            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    69
                <include name="sample.ant.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    70
            </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    71
            <hlm:checkTargetName severity="warning" enabled="true" regexp="([a-z0-9[\\d\\-]]*)" />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    72
        </hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    73
        <au:assertLogContains text="WARNING: INVALID Target Name: Check_target.Name" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    74
    </target>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    75
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    76
    <target name="test-check-indentation">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    77
        <hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    78
            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    79
                <include name="sample.ant.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    80
            </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    81
            <hlm:checkIndentation severity="warning" enabled="true"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    82
        </hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    83
        <au:assertLogContains text="WARNING: 248: Bad indentation" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    84
    </target>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    85
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    86
   <target name="test-check-presetdef-macrodef-name">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    87
        <hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    88
            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    89
                <include name="sample.antlib.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    90
                <include name="sample.ant.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    91
            </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    92
            <hlm:checkPresetDefMacroDefName enabled="true" severity="warning" regexp="([a-z0-9][a-zA-Z0-9]*)"/>       
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    93
        </hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    94
        <au:assertLogContains text="WARNING: INVALID PRESETDEF/MACRODEF Name: check_PresetDef.Name" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    95
        <au:assertLogContains text="WARNING: INVALID PRESETDEF/MACRODEF Name: foo_Macro" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    96
    </target>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    97
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    98
    <target name="test-check-project-name">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
    99
        <hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   100
            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   101
                <include name="sample.ant.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   102
                <include name="invalid.build.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   103
            </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   104
            <hlm:checkProjectName enabled="true" severity="warning" regexp="([a-z0-9[\\d\\.\\_\\-]]*)"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   105
        </hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   106
        <au:assertLogContains text="WARNING: INVALID Project Name: Sample" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   107
        <au:assertLogContains text="WARNING: Project name not specified!" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   108
    </target>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   109
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   110
    <target name="test-check-description">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   111
        <hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   112
            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   113
                <include name="build.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   114
            </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   115
            <hlm:checkDescription enabled="true" severity="warning"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   116
        </hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   117
        <au:assertLogContains text="WARNING: Description not specified!" level="info"/>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   118
    </target>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   119
    
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   120
    <target name="test-check-runtarget">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   121
        <hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   122
            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   123
                <include name="sample.ant.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   124
            </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   125
            <hlm:checkRunTarget enabled="true" severity="warning"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   126
        </hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   127
        <au:assertLogContains text="runtarget> calls the target smile that has dependencies!" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   128
    </target>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   129
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   130
    <target name="test-check-antcall">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   131
        <hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   132
            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   133
                <include name="sample.ant.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   134
            </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   135
            <hlm:checkAntCall enabled="true" severity="warning"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   136
        </hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   137
        <au:assertLogContains text="antcall> is used with no param elements and calls the target hello that has no dependencies!" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   138
    </target>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   139
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   140
    <target name="test-check-script-size">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   141
        <hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   142
            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   143
                <include name="sample.ant.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   144
            </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   145
            <hlm:checkScriptSize enabled="true" severity="warning"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   146
        </hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   147
        <au:assertLogContains text="WARNING: Target check-script-size has a script with 1098 characters, code should be inside a python file" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   148
    </target>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   149
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   150
    <target name="test-check-use-of-if-in-targets">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   151
        <hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   152
            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   153
                <include name="sample.ant.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   154
            </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   155
            <hlm:checkUseOfIfInTargets enabled="true" severity="warning"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   156
        </hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   157
        <au:assertLogContains text="WARNING: Target check-use-of-if-in-targets poor use of if statement, use " level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   158
        <au:assertLogContains text="WARNING: Target check-use-of-if-else-in-targets poor use of if-else-property statement, use condition task" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   159
        <au:assertLogContains text="WARNING: Target check-use-of-if-then-in-targets poor use of if-then-property statement, use condition task" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   160
        <au:assertLogContains text="WARNING: Target check-prop-in-scriptcondition poor use of if-else-property statement, use condition task" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   161
        <au:assertLogContains text="WARNING: Target check-scriptcondition poor use of if-else-property statement, use condition task" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   162
    </target>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   163
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   164
    <target name="test-check-jython-script">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   165
        <hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   166
            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   167
                <include name="sample.ant.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   168
                <include name="sample.antlib.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   169
            </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   170
            <hlm:checkJythonScript enabled="true" severity="warning" outputDir="${antlint.test.dir}/data/output"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   171
        </hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   172
        <au:assertLogContains text="found in target_check-jython-script" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   173
        <au:assertLogContains text="found in check-script" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   174
    </target>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   175
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   176
    <target name="test-check-use-of-equals-task">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   177
        <hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   178
            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   179
                <include name="sample.ant.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   180
            </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   181
            <hlm:checkUseOfEqualsTask severity="warning" enabled="true"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   182
        </hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   183
        <au:assertLogContains text="WARNING: test.boolean1 uses 'equals' should use 'istrue' task" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   184
        <au:assertLogContains text="WARNING: test.boolean2 uses 'equals' should use 'istrue' task" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   185
    </target>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   186
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   187
    <target name="test-check-script-condition">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   188
        <hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   189
            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   190
                <include name="sample.ant.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   191
                <include name="sample.antlib.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   192
            </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   193
            <hlm:checkScriptCondition enabled="true" severity="warning" outputDir="${antlint.test.dir}/data/output"/> 
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   194
        </hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   195
        <au:assertLogContains text="found in scriptcondition_check-scriptcondition" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   196
    </target>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   197
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   198
    <target name="test-check-python-tasks">
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   199
        <hlm:antlint>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   200
            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   201
                <include name="*.xml"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   202
                <include name="*.ant.xml"/>
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   203
                <include name="build.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   204
                <include name="*.antlib.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   205
            </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   206
            <hlm:checkPythonTasks severity="warning" enabled="true" outputDir="${antlint.test.dir}/data/output"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   207
        </hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   208
        <au:assertFileExists file="${antlint.test.dir}/data/output/python/target0_check-prop-in-pythontask.py"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   209
        <au:assertFileExists file="${antlint.test.dir}/data/output/python/target0_check-script-size.py"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   210
    </target>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   211
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   212
    <target name="test-check-scriptdef-name-attributes">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   213
        <hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   214
            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   215
                <include name="sample.antlib.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   216
            </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   217
            <hlm:checkScriptDefNameAttributes severity="warning" enabled="true" />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   218
        </hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   219
        <au:assertLogContains text="WARNING: Scriptdef check-scriptdef-attributes does not have attribute target" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   220
    </target>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   221
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   222
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   223
    <target name="test-check-scriptdef-style">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   224
        <hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   225
            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   226
                <include name="sample.antlib.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   227
            </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   228
            <hlm:checkScriptDefStyle severity="warning" enabled="true" />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   229
        </hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   230
        <au:assertLogContains text="WARNING: Scriptdef check-scriptdef-style doesn't reference attributes directly, poor style" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   231
    </target>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   232
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   233
    <target name="test-check-scriptdef">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   234
        <hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   235
            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   236
                <include name="sample.antlib.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   237
            </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   238
            <hlm:checkScriptDef severity="warning" enabled="true" outputDir="${antlint.test.dir}/data/output"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   239
        </hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   240
        <au:assertLogContains text="WARNING: Scriptdef check-scriptdef does not use attr2" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   241
        <au:assertLogContains text="WARNING: Scriptdef check-scriptdef-beanshell does not use attr2" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   242
    </target>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   243
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   244
    <target name="test-check-duplicate-names">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   245
        <hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   246
            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   247
                <include name="*.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   248
                <include name="*.ant.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   249
                <include name="build.xml"/>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   250
                <include name="*.antlib.xml"/>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   251
            </fileset>
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   252
            <hlm:checkDuplicateNames enabled="true" severity="warning"/>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   253
        </hlm:antlint>
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   254
    </target>
588
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   255
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   256
    <target name="test-check-filename">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   257
        <hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   258
            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   259
                <include name="invalid.build.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   260
            </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   261
            <hlm:checkFileName severity="warning" enabled="true" regexp="^build.xml$|ant.xml$|antlib.xml$" />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   262
        </hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   263
        <au:assertLogContains text="WARNING: INVALID File Name:" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   264
    </target>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   265
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   266
    <target name="test-antlint-failonerror-false">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   267
        <hlm:antlint failonerror="false">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   268
            <fileset id="antlint.files" dir="${antlint.test.dir}/data">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   269
                <include name="*.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   270
                <include name="*.ant.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   271
                <include name="build.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   272
                <include name="*.antlib.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   273
            </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   274
            <hlm:checkTabCharacter severity="error" enabled="true"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   275
            <hlm:checkProjectName enabled="true" severity="error" regexp="([a-z0-9[\\d\\.\\_\\-]]*)"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   276
            <hlm:checkScriptDefNameAttributes severity="error" enabled="true" />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   277
        </hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   278
        <au:assertLogContains text="ERROR: Scriptdef check-scriptdef-attributes does not have attribute target" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   279
        <au:assertLogContains text="ERROR: Project name not specified!" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   280
    </target> 
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   281
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   282
    <target name="test-antlint-failonerror-true">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   283
        <au:expectfailure>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   284
            <hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   285
                <fileset id="antlint.files" dir="${antlint.test.dir}/data">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   286
                    <include name="*.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   287
                    <include name="*.ant.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   288
                    <include name="build.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   289
                    <include name="*.antlib.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   290
                </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   291
                <hlm:checkTabCharacter severity="error" enabled="true"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   292
                <hlm:checkProjectName enabled="true" severity="error" regexp="([a-z0-9[\\d\\.\\_\\-]]*)"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   293
                <hlm:checkScriptDefNameAttributes severity="error" enabled="true" />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   294
            </hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   295
        </au:expectfailure>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   296
        <au:assertLogContains text="ERROR: Scriptdef check-scriptdef-attributes does not have attribute target" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   297
        <au:assertLogContains text="ERROR: Project name not specified!" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   298
    </target>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   299
    
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   300
    <target name="test-antlint-console-and-xml-reporting">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   301
        <au:expectfailure>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   302
            <hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   303
                <fileset id="antlint.files" dir="${antlint.test.dir}/data">
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   304
                    <include name="*.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   305
                    <include name="*.ant.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   306
                    <include name="build.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   307
                    <include name="*.antlib.xml"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   308
                </fileset>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   309
                <hlm:checkTabCharacter severity="error" enabled="true"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   310
                <hlm:checkProjectName enabled="true" severity="error" regexp="([a-z0-9[\\d\\.\\_\\-]]*)"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   311
                <hlm:checkScriptDefNameAttributes severity="error" enabled="true" />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   312
                
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   313
                <!-- reporters -->
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   314
                <hlm:antlintCheckstyleReporter file="${antlint.test.dir}/data/output/report.xml" />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   315
                <hlm:antlintConsoleReporter />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   316
            </hlm:antlint>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   317
        </au:expectfailure>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   318
        <au:assertLogContains text="ERROR: Scriptdef check-scriptdef-attributes does not have attribute target" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   319
        <au:assertLogContains text="ERROR: Project name not specified!" level="info"/>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   320
        <au:assertFileExists file="${antlint.test.dir}/data/output/report.xml" />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   321
        <loadfile property="report.xml" srcfile="${antlint.test.dir}/data/output/report.xml" />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   322
        <echo>${report.xml}</echo>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   323
        <au:assertTrue>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   324
            <and>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   325
                <contains string="${report.xml}" substring="&lt;error" />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   326
                <contains string="${report.xml}" substring="Scriptdef check-scriptdef-attributes does not have attribute target" />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   327
                <contains string="${report.xml}" substring="Project name not specified!" />
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   328
            </and>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   329
        </au:assertTrue>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   330
    </target>
c7c26511138f helium-10.0.0-bc45d50958fe
wbernard
parents: 587
diff changeset
   331
    
628
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   332
    <target name="test-check-try-catch-block-with-empty-catch-block">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   333
        <au:expectfailure>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   334
            <hlm:antlint>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   335
                <fileset file="${antlint.test.dir}/data/sample.ant.xml"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   336
                <hlm:checkTryCatchBlock severity="error" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   337
            </hlm:antlint>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   338
        </au:expectfailure>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   339
        <au:assertLogContains text="trycatch> block found without " level="info"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   340
    </target>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   341
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   342
    <target name="test-check-try-catch-block-with-multiple-catch-block">
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   343
        <au:expectfailure>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   344
            <hlm:antlint>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   345
                <fileset file="${antlint.test.dir}/data/sample.ant.xml"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   346
                <hlm:checkTryCatchBlock severity="error" />
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   347
            </hlm:antlint>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   348
        </au:expectfailure>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   349
        <au:assertLogContains text="trycatch> block found with 2 " level="info"/>
7c4a911dc066 helium_11.0.0-e00f171ca185
wbernard
parents: 588
diff changeset
   350
    </target>
587
85df38eb4012 helium_9.0-a7879c935424
wbernard
parents:
diff changeset
   351
</project>