This file is indexed.

/usr/share/doc/libantelope-java/manual/bk03ch24.html is in libantelope-java-doc 3.5.1-4.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
<html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Chapter 24. Repeat Task</title><meta name="generator" content="DocBook XSL Stylesheets V1.79.1"><link rel="home" href="index.html" title="Antelope Users Guide"><link rel="up" href="bk03.html" title="Additional Ant Tasks"><link rel="prev" href="bk03ch23.html" title="Chapter 23. Split Task"><link rel="next" href="bk03ch25.html" title="Chapter 25. Suite Task"></head><body bgcolor="white" text="black" link="#0000FF" vlink="#840084" alink="#0000FF"><div class="navheader"><table width="100%" summary="Navigation header"><tr><th colspan="3" align="center">Chapter 24. Repeat Task</th></tr><tr><td width="20%" align="left"><a accesskey="p" href="bk03ch23.html">Prev</a> </td><th width="60%" align="center">Additional Ant Tasks</th><td width="20%" align="right"> <a accesskey="n" href="bk03ch25.html">Next</a></td></tr></table><hr></div><div class="chapter"><div class="titlepage"><div><div><h1 class="title"><a name="Repeat"></a>Chapter 24. Repeat Task</h1></div></div></div>
@style@
    <p>
The Repeat task performs the same subtasks over and over a certain number of times or until a condition is met.  Since most tasks are configured when the build file is first loaded and never again, this task may not do what you want.
</p><p>
To use this task in your build files, include a task definition like this:
</p><pre class="programlisting">

    &lt;taskdef name="call" classname="ise.antelope.tasks.Repeat"/&gt;
   
</pre><p>
</p><p>
</p><div class="table"><a name="idm2120"></a><p class="title"><b>Table 24.1. Repeat Task Attributes</b></p><div class="table-contents"><table class="table" summary="Repeat Task Attributes" border="1"><colgroup><col><col><col><col></colgroup><thead><tr><th>Attribute</th><th>Description</th><th>Default</th><th>Required</th></tr></thead><tbody><tr><td>count</td><td>The number of times to repeat execution of the nested tasks.</td><td>1</td><td>No</td></tr><tr><td>interval</td><td>How long to wait between repetitions.  If set to 0, only 1 repetition will be performed, this is to avoid a tight loop.</td><td>0</td><td>No</td></tr><tr><td>unit</td><td>The units for interval, allowed values are "milliseconds", "seconds", "minutes", "days", and "weeks"</td><td>seconds</td><td>No</td></tr><tr><td>property</td><td>The name of a property to set upon completion.</td><td>None</td><td>No</td></tr><tr><td>value</td><td>The value to set for the property to be set upon completion.</td><td>None</td><td>No</td></tr></tbody></table></div></div><p><br class="table-break">
</p><p>
Here are a number of examples taken from the unit tests for this task:
</p><pre class="programlisting">

   &lt;target name="test1a"&gt;
      &lt;!-- no count set, verify performs tasks once --&gt;
      &lt;a:var name="count" value="0"/&gt;
      &lt;a:repeat&gt;
         &lt;a:math result="count" operand1="${count}" operand2="1" operation="+"/&gt;
      &lt;/a:repeat&gt;
      &lt;a:assert&gt;
         &lt;bool&gt;
            &lt;mathequals arg1="${count}" arg2="1"/&gt;
         &lt;/bool&gt;
      &lt;/a:assert&gt;
   &lt;/target&gt;

   &lt;target name="test1b"&gt;
      &lt;!-- count &gt; 1, verify performs tasks correct number of times --&gt;
      &lt;a:var name="count" value="0"/&gt;
      &lt;a:repeat count="3" interval="1"&gt;
         &lt;a:math result="count" operand1="${count}" operand2="1" operation="+"/&gt;
      &lt;/a:repeat&gt;
      &lt;a:assert message="Expected 3, got ${count}"&gt;
         &lt;bool&gt;
            &lt;mathequals arg1="${count}" arg2="3"/&gt;
         &lt;/bool&gt;
      &lt;/a:assert&gt;
   &lt;/target&gt;

   &lt;target name="test1c"&gt;
      &lt;!-- count = -1, verify performs tasks indefinitely --&gt;
      &lt;a:var name="count" value="0"/&gt;
      &lt;a:limit maxwait="10"&gt;
         &lt;a:repeat count="-1" interval="1"&gt;
            &lt;a:math result="count" operand1="${count}" operand2="1" operation="+"/&gt;
         &lt;/a:repeat&gt;
      &lt;/a:limit&gt;
      &lt;a:assert&gt;
         &lt;bool&gt;
            &lt;and&gt;
               &lt;a:isgreaterthan arg1="${count}" arg2="8"/&gt;
               &lt;a:islessthan arg1="${count}" arg2="12"/&gt;
            &lt;/and&gt;
         &lt;/bool&gt;
      &lt;/a:assert&gt;
   &lt;/target&gt;

   &lt;target name="test2a"&gt;
      &lt;!-- no interval set, verify performs tasks 10 seconds apart --&gt;
      &lt;a:var name="count" value="0"/&gt;
      &lt;a:stopwatch name="test2a_stopwatch" action="start"/&gt;
      &lt;a:repeat count="2"&gt;
         &lt;a:math result="count" operand1="${count}" operand2="1" operation="+"/&gt;
      &lt;/a:repeat&gt;
      &lt;a:stopwatch name="test2a_stopwatch" action="total"/&gt;
      &lt;a:assert message="Got ${count}, expected 2"&gt;
         &lt;bool&gt;
            &lt;and&gt;
               &lt;a:mathequals arg1="${count}" arg2="2"/&gt;
               &lt;a:islessthan arg1="${test2a_stopwatch}" arg2="11"/&gt;
            &lt;/and&gt;
         &lt;/bool&gt;
      &lt;/a:assert&gt;
   &lt;/target&gt;


   &lt;target name="test2b"&gt;
      &lt;!-- interval set to other than 10 seconds, verify tasks performed correct
           time apart. --&gt;
      &lt;a:var name="count" value="0"/&gt;
      &lt;a:stopwatch name="test2b_stopwatch" action="start"/&gt;
      &lt;a:repeat count="2" interval="5"&gt;
         &lt;a:math result="count" operand1="${count}" operand2="1" operation="+"/&gt;
      &lt;/a:repeat&gt;
      &lt;a:stopwatch name="test2b_stopwatch" action="total"/&gt;
      &lt;a:assert&gt;
         &lt;bool&gt;
            &lt;and&gt;
               &lt;a:mathequals arg1="${count}" arg2="2"/&gt;
               &lt;a:islessthan arg1="${test2b_stopwatch}" arg2="6"/&gt;
            &lt;/and&gt;
         &lt;/bool&gt;
      &lt;/a:assert&gt;
   &lt;/target&gt;

   &lt;target name="test2c"&gt;
      &lt;!-- interval = 0, verify tasks performed just once --&gt;
      &lt;a:var name="count" value="0"/&gt;
      &lt;a:stopwatch name="test2c_stopwatch" action="start"/&gt;
      &lt;a:repeat count="5" interval="0"&gt;
         &lt;a:math result="count" operand1="${count}" operand2="1" operation="+" datatype="int"/&gt;
      &lt;/a:repeat&gt;
      &lt;a:stopwatch name="test2c_stopwatch" action="total"/&gt;
      &lt;a:assert&gt;
         &lt;bool&gt;
            &lt;and&gt;
               &lt;a:mathequals arg1="${count}" arg2="1"/&gt;
               &lt;a:islessthan arg1="${test2c_stopwatch}" arg2="1"/&gt;
            &lt;/and&gt;
         &lt;/bool&gt;
      &lt;/a:assert&gt;
   &lt;/target&gt;

   &lt;target name="test3a"&gt;
      &lt;!-- failOnError not set, verify continues to execute tasks even if one fails --&gt;
      &lt;a:var name="count" value="0"/&gt;
      &lt;a:repeat count="3" interval="1"&gt;
         &lt;a:math result="count" operand1="${count}" operand2="1" operation="+"/&gt;
         &lt;fail/&gt;
      &lt;/a:repeat&gt;
      &lt;a:assert&gt;
         &lt;bool&gt;
            &lt;a:mathequals arg1="${count}" arg2="3"/&gt;
         &lt;/bool&gt;
      &lt;/a:assert&gt;
   &lt;/target&gt;

   &lt;target name="test3b"&gt;
      &lt;!-- failOnError set to false, same as 3a --&gt;
      &lt;a:var name="count" value="0"/&gt;
      &lt;a:repeat count="3" interval="1" failonerror="no"&gt;
         &lt;a:math result="count" operand1="${count}" operand2="1" operation="+"/&gt;
         &lt;fail/&gt;
      &lt;/a:repeat&gt;
      &lt;a:assert&gt;
         &lt;bool&gt;
            &lt;a:mathequals arg1="${count}" arg2="3"/&gt;
         &lt;/bool&gt;
      &lt;/a:assert&gt;
   &lt;/target&gt;

   &lt;target name="test3c"&gt;
      &lt;!-- failOnError set to true, verify build fails if subtask fails --&gt;
      &lt;a:var name="count" value="0"/&gt;
      &lt;a:try&gt;
         &lt;a:repeat count="3" interval="1" failonerror="yes"&gt;
            &lt;a:math result="count" operand1="${count}" operand2="1" operation="+"/&gt;
            &lt;fail/&gt;
         &lt;/a:repeat&gt;
      &lt;/a:try&gt;
      &lt;a:assert&gt;
         &lt;bool&gt;
            &lt;a:mathequals arg1="${count}" arg2="1"/&gt;
         &lt;/bool&gt;
      &lt;/a:assert&gt;
   &lt;/target&gt;

   &lt;target name="test4a"&gt;
      &lt;!-- property name set, value not set, verify property is set to true when task
           is complete --&gt;
      &lt;a:var name="count" value="0"/&gt;
      &lt;a:repeat count="1" interval="1" property="test4a_property"&gt;
         &lt;a:math result="count" operand1="${count}" operand2="1" operation="+"/&gt;
         &lt;fail/&gt;
      &lt;/a:repeat&gt;
      &lt;a:assert&gt;
         &lt;bool&gt;
            &lt;istrue value="${test4a_property}"/&gt;
         &lt;/bool&gt;
      &lt;/a:assert&gt;
   &lt;/target&gt;

   &lt;target name="test4b"&gt;
      &lt;!-- property ame set, value set to a specific value, verify property is set to
           specific value when task is complete --&gt;
      &lt;a:var name="count" value="0"/&gt;
      &lt;a:repeat count="1" interval="1" property="test4b_property" value="good"&gt;
         &lt;a:math result="count" operand1="${count}" operand2="1" operation="+"/&gt;
         &lt;fail/&gt;
      &lt;/a:repeat&gt;
      &lt;a:assert name="test4b_property" value="good"/&gt;
   &lt;/target&gt;

   &lt;target name="test5"&gt;
      &lt;property name="call_count" value="0"/&gt;
      &lt;a:limit seconds="5" failonerror="true"&gt;
         &lt;a:repeat count="-1" interval="1"&gt;
            &lt;a:until&gt;
               &lt;a:contains property="log_contents" substring="All tests passed 4 times." /&gt;
            &lt;/a:until&gt;

            &lt;echo&gt;read log&lt;/echo&gt;
            &lt;a:new&gt;
               &lt;a:call target="readLog"/&gt;
            &lt;/a:new&gt;
            &lt;echo&gt;${call_count} - ${log_contents}&lt;/echo&gt;

         &lt;/a:repeat&gt;
      &lt;/a:limit&gt;
   &lt;/target&gt;

   &lt;target name="readLog"&gt;
      &lt;a:unset name="log_contents"/&gt;
      &lt;a:new&gt;
         &lt;a:math result="call_count" operand1="${call_count}" operand2="1" operation="+" datatype="int"/&gt;
         &lt;property name="log_contents" value="All tests passed ${call_count} times."/&gt;
      &lt;/a:new&gt;
   &lt;/target&gt;

</pre><p>
</p></div><div class="navfooter"><hr><table width="100%" summary="Navigation footer"><tr><td width="40%" align="left"><a accesskey="p" href="bk03ch23.html">Prev</a> </td><td width="20%" align="center"><a accesskey="u" href="bk03.html">Up</a></td><td width="40%" align="right"> <a accesskey="n" href="bk03ch25.html">Next</a></td></tr><tr><td width="40%" align="left" valign="top">Chapter 23. Split Task </td><td width="20%" align="center"><a accesskey="h" href="index.html">Home</a></td><td width="40%" align="right" valign="top"> Chapter 25. Suite Task</td></tr></table></div></body></html>