Debian Codegraph @

test/resources/logic/switch.xml

raw symbols SCIP
1 <project default="invalid">
2 <target name="invalid">
3 <fail>Don't call this file directly.</fail>
4 </target>
5
6 <target name="setup">
7 <taskdef resource="net/sf/antcontrib/antcontrib.properties">
8 <classpath location="${antcontrib.jar}"/>
9 </taskdef>
10 </target>
11
12 <target name="noValue" depends="setup">
13 <switch/>
14 </target>
15
16 <target name="noChildren" depends="setup">
17 <switch value="foo"/>
18 </target>
19
20 <target name="twoDefaults" depends="setup">
21 <switch value="foo">
22 <default/>
23 <default/>
24 </switch>
25 </target>
26
27 <target name="noMatch" depends="setup">
28 <switch value="foo">
29 <case value="bar"/>
30 </switch>
31 </target>
32
33 <target name="caseNoValue" depends="setup">
34 <switch value="foo">
35 <case/>
36 </switch>
37 </target>
38
39 <target name="testDefault" depends="setup">
40 <switch value="foo">
41 <case value="bar">
42 <echo>In case</echo>
43 </case>
44 <default>
45 <echo>In default</echo>
46 <property name="inner" value="baz"/>
47 <echo>${inner}</echo>
48 </default>
49 </switch>
50 </target>
51
52 <target name="testCase" depends="setup">
53 <switch value="foo">
54 <case value="foo">
55 <echo>In case</echo>
56 <property name="inner" value="baz"/>
57 <echo>${inner}</echo>
58 </case>
59 <default>
60 <echo>In default</echo>
61 </default>
62 </switch>
63 </target>
64
65 <target name="testCaseSensitive" depends="setup">
66 <switch value="FOO">
67 <case value="foo">
68 <echo>In case</echo>
69 </case>
70 <default>
71 <echo>In default</echo>
72 </default>
73 </switch>
74 </target>
75
76 <target name="testCaseInSensitive" depends="setup">
77 <switch value="FOO" caseinsensitive="true">
78 <case value="foo">
79 <echo>In case</echo>
80 </case>
81 <default>
82 <echo>In default</echo>
83 </default>
84 </switch>
85 </target>
86
87 </project>