| @@ -22,7 +22,7 @@ | |||
| --> | |||
| <xsl:output method="html" indent="yes" encoding="US-ASCII"/> | |||
| <xsl:decimal-format decimal-separator="." grouping-separator="," /> | |||
| <xsl:decimal-format decimal-separator="." grouping-separator=","/> | |||
| <xsl:param name="output.dir" select="'.'"/> | |||
| <xsl:param name="basedir" select="'.'"/> | |||
| @@ -43,7 +43,7 @@ | |||
| <xsl:call-template name="sorted.css"/> | |||
| </redirect:write> | |||
| <!-- create the switch.js for collepsing the data --> | |||
| <!-- create the switch.js for collapsing the data --> | |||
| <redirect:write file="{$output.dir}/switch.js"> | |||
| <xsl:call-template name="switch.js"/> | |||
| </redirect:write> | |||
| @@ -76,15 +76,15 @@ | |||
| <!-- | |||
| Key for detecting duplicate CheckModules | |||
| Key for detecting duplicate CheckModules | |||
| --> | |||
| <xsl:key name="module" match="file/error" use="@source"/> | |||
| <!-- | |||
| Generates the navagation bar. | |||
| --> | |||
| Generates the navigation bar. | |||
| --> | |||
| <xsl:template match="checkstyle" mode="navigation"> | |||
| <ul id="navigation"> | |||
| <xsl:for-each select="file/error[generate-id() = generate-id(key('module',@source))]"> | |||
| @@ -100,13 +100,13 @@ | |||
| </a></li> | |||
| </xsl:for-each> | |||
| </ul> | |||
| </xsl:template> | |||
| </xsl:template> | |||
| <!-- | |||
| Generates the data part. | |||
| --> | |||
| --> | |||
| <xsl:template match="checkstyle" mode="data"> | |||
| <div id="content"> | |||
| <xsl:for-each select="file/error[generate-id() = generate-id(key('module',@source))]"> | |||
| @@ -120,13 +120,13 @@ | |||
| </div> | |||
| </xsl:for-each> | |||
| </div> | |||
| </xsl:template> | |||
| </xsl:template> | |||
| <!-- | |||
| Generates the content table for the given check module. | |||
| @param filter full qualified module name | |||
| @param filter full qualified module name | |||
| --> | |||
| <xsl:template name="data"> | |||
| <xsl:param name="filter"/> | |||
| @@ -157,7 +157,7 @@ | |||
| Generates the data rows for the current check module. | |||
| Ignores errors in the current file from other modules. | |||
| @param node the file with the errors | |||
| @param filter full qualified module name | |||
| @param filter full qualified module name | |||
| --> | |||
| <xsl:template name="data-rows"> | |||
| <xsl:param name="node"/> | |||
| @@ -180,68 +180,68 @@ | |||
| <!-- | |||
| <!-- | |||
| Generates the CSS with the layout instructions. | |||
| Generated so this XSL is the single source of the whole report. | |||
| --> | |||
| <xsl:template name="sorted.css"> | |||
| body { | |||
| body { | |||
| font:normal 80% arial,helvetica,sanserif; | |||
| color: black; | |||
| background-color: white; | |||
| margin: 0; | |||
| padding: 1em; | |||
| color: black; | |||
| background-color: white; | |||
| margin: 0; | |||
| padding: 1em; | |||
| min-width: 41em; | |||
| } | |||
| h1 { | |||
| } | |||
| h1 { | |||
| font-weight:bold; | |||
| font-size:140%; | |||
| margin: 0 0 0.7em; | |||
| padding: 0.3em; | |||
| text-align: center; | |||
| background-color: #eee; | |||
| border: 2px ridge silver; | |||
| } | |||
| html<xsl:text disable-output-escaping="yes">></xsl:text>body h1 { | |||
| margin: 0 0 0.7em; | |||
| padding: 0.3em; | |||
| text-align: center; | |||
| background-color: #eee; | |||
| border: 2px ridge silver; | |||
| } | |||
| html<xsl:text disable-output-escaping="yes">></xsl:text>body h1 { | |||
| border-color: gray; | |||
| } | |||
| ul#navigation { | |||
| font-size: 0.83em; | |||
| float: left; width: 18em; | |||
| margin: 0 0 1.2em; padding: 0; | |||
| border: 1px dashed silver; | |||
| } | |||
| ul#navigation li { | |||
| list-style: none; | |||
| margin: 0; padding: 0.2em; | |||
| } | |||
| ul#navigation a { | |||
| display: block; | |||
| padding: 0.2em; | |||
| font-weight: bold; | |||
| } | |||
| ul#navigation a:link { | |||
| color: black; background-color: #eee; | |||
| } | |||
| ul#navigation a:visited { | |||
| color: #666; background-color: #eee; | |||
| } | |||
| ul#navigation a:hover { | |||
| color: red; background-color: white; | |||
| } | |||
| ul#navigation a:active { | |||
| color: white; background-color: gray; | |||
| } | |||
| div#content { | |||
| margin: 0 1em 1em 16em; | |||
| padding: 0 1em; | |||
| } | |||
| * html div#content { | |||
| height: 1em; /* Workaround 3-Pixel-Bug of Internet Explorers */ | |||
| } | |||
| div#content h2 { | |||
| ul#navigation { | |||
| font-size: 0.83em; | |||
| float: left; width: 18em; | |||
| margin: 0 0 1.2em; padding: 0; | |||
| border: 1px dashed silver; | |||
| } | |||
| ul#navigation li { | |||
| list-style: none; | |||
| margin: 0; padding: 0.2em; | |||
| } | |||
| ul#navigation a { | |||
| display: block; | |||
| padding: 0.2em; | |||
| font-weight: bold; | |||
| } | |||
| ul#navigation a:link { | |||
| color: black; background-color: #eee; | |||
| } | |||
| ul#navigation a:visited { | |||
| color: #666; background-color: #eee; | |||
| } | |||
| ul#navigation a:hover { | |||
| color: red; background-color: white; | |||
| } | |||
| ul#navigation a:active { | |||
| color: white; background-color: gray; | |||
| } | |||
| div#content { | |||
| margin: 0 1em 1em 16em; | |||
| padding: 0 1em; | |||
| } | |||
| * html div#content { | |||
| height: 1em; /* Workaround 3-Pixel-Bug of Internet Explorers */ | |||
| } | |||
| div#content h2 { | |||
| font-size:100%; | |||
| font-weight:bold; | |||
| background: #525D76; | |||
| @@ -251,11 +251,11 @@ | |||
| margin-right: 2px; | |||
| margin-left: 2px; | |||
| margin-bottom: 0; | |||
| } | |||
| div#content p { | |||
| font-size: 1em; | |||
| margin: 1em 0; | |||
| } | |||
| } | |||
| div#content p { | |||
| font-size: 1em; | |||
| margin: 1em 0; | |||
| } | |||
| table { | |||
| width:100%; | |||
| border-collapse:collapse; | |||
| @@ -275,62 +275,62 @@ | |||
| table tr:nth-child(even) td { | |||
| background: #fff; | |||
| } | |||
| </xsl:template> | |||
| </xsl:template> | |||
| <!-- | |||
| Generates the JavaScript for the dynamic style. | |||
| <!-- | |||
| Generates the JavaScript for the dynamic style. | |||
| Generated so this XSL is the single source of the whole report. | |||
| --> | |||
| <xsl:template name="switch.js"> | |||
| /* | |||
| /* | |||
| * Hides all "hideable" div-containers | |||
| */ | |||
| function hideAll() { | |||
| allElements = document.getElementsByTagName("div"); | |||
| for (i = 0; i <xsl:text disable-output-escaping="yes"><</xsl:text> allElements.length; i++) { | |||
| if (allElements[i].className=="hideable") { | |||
| allElements[i].style.display="none"; | |||
| } | |||
| } | |||
| return; | |||
| } | |||
| /* | |||
| for (i = 0; i <xsl:text disable-output-escaping="yes"><</xsl:text> allElements.length; i++) { | |||
| if (allElements[i].className=="hideable") { | |||
| allElements[i].style.display="none"; | |||
| } | |||
| } | |||
| return; | |||
| } | |||
| /* | |||
| * Shows one div-container and hides the other. | |||
| * @param id id of the element to show | |||
| */ | |||
| function change(id) { | |||
| hideAll(); | |||
| e = document.getElementById(id); | |||
| if (e.style.display=="none") { | |||
| e.style.display=""; | |||
| } | |||
| window.scrollTo(0, 0); | |||
| return; | |||
| } | |||
| /* | |||
| function change(id) { | |||
| hideAll(); | |||
| e = document.getElementById(id); | |||
| if (e.style.display=="none") { | |||
| e.style.display=""; | |||
| } | |||
| window.scrollTo(0, 0); | |||
| return; | |||
| } | |||
| /* | |||
| * Shows only the first data row. | |||
| * Used in body:onload so the user could directly see some messages. | |||
| */ | |||
| function openFirst() { | |||
| hideAll(); | |||
| for (i = 0; i <xsl:text disable-output-escaping="yes"><</xsl:text> allElements.length; i++) { | |||
| if (allElements[i].className=="hideable") { | |||
| for (i = 0; i <xsl:text disable-output-escaping="yes"><</xsl:text> allElements.length; i++) { | |||
| if (allElements[i].className=="hideable") { | |||
| allElements[i].style.display=""; | |||
| return; | |||
| } | |||
| } | |||
| return; | |||
| return; | |||
| } | |||
| } | |||
| return; | |||
| } | |||
| </xsl:template> | |||
| <!-- | |||
| Calculates the index of the last occurence of a substring in a string. | |||
| Calculates the index of the last occurrence of a substring in a string. | |||
| @param txt the whole string in which to search | |||
| @delimiter the substring to search | |||
| --> | |||
| @@ -19,7 +19,7 @@ | |||
| WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | |||
| See the License for the specific language governing permissions and | |||
| limitations under the License. | |||
| --> | |||
| <!-- | |||
| @@ -271,7 +271,7 @@ | |||
| </xsl:if> | |||
| <xsl:for-each select="UsedBy/Package"> | |||
| <a> | |||
| <xsl:attribute name="href">overview-packages.html#PK<xsl:value-of select="node()"/></xsl:attribute> | |||
| <xsl:attribute name="href">overview-packages.html#PK<xsl:value-of select="node()"/></xsl:attribute> | |||
| <xsl:value-of select="node()"/> | |||
| </a><br/> | |||
| </xsl:for-each> | |||
| @@ -282,7 +282,7 @@ | |||
| </xsl:if> | |||
| <xsl:for-each select="DependsUpon/Package"> | |||
| <a> | |||
| <xsl:attribute name="href">overview-packages.html#PK<xsl:value-of select="node()"/></xsl:attribute> | |||
| <xsl:attribute name="href">overview-packages.html#PK<xsl:value-of select="node()"/></xsl:attribute> | |||
| <xsl:value-of select="node()"/> | |||
| </a><br/> | |||
| </xsl:for-each> | |||
| @@ -325,7 +325,7 @@ | |||
| </td></tr></table> --> | |||
| <xsl:if test="count(Cycles/Package) = 0"> | |||
| <p>There are no cyclic dependancies.</p> | |||
| <p>There are no cyclic dependencies.</p> | |||
| </xsl:if> | |||
| <xsl:for-each select="Cycles/Package"> | |||
| <h3><a><xsl:attribute name="name">#CY<xsl:value-of select="@Name"/></xsl:attribute><xsl:value-of select="@Name"/></a></h3><p> | |||
| @@ -373,10 +373,10 @@ | |||
| <p>The range for this metric is 0 to 1, with A=0 indicating a completely concrete package and A=1 indicating a completely abstract package. </p> | |||
| <h3><a name="EXinstability">Instability</a></h3> | |||
| <p>The ratio of efferent coupling (Ce) to total coupling (Ce / (Ce + Ca)). This metric is an indicator of the package's resilience to change. </p> | |||
| <p>The range for this metric is 0 to 1, with I=0 indicating a completely stable package and I=1 indicating a completely instable package. </p> | |||
| <p>The range for this metric is 0 to 1, with I=0 indicating a completely stable package and I=1 indicating a completely unstable package. </p> | |||
| <h3><a name="EXdistance">Distance</a></h3> | |||
| <p>The perpendicular distance of a package from the idealized line A + I = 1. This metric is an indicator of the package's balance between abstractness and stability. </p> | |||
| <p>A package squarely on the main sequence is optimally balanced with respect to its abstractness and stability. Ideal packages are either completely abstract and stable (x=0, y=1) or completely concrete and instable (x=1, y=0). </p> | |||
| <p>A package squarely on the main sequence is optimally balanced with respect to its abstractness and stability. Ideal packages are either completely abstract and stable (x=0, y=1) or completely concrete and unstable (x=1, y=0). </p> | |||
| <p>The range for this metric is 0 to 1, with D=0 indicating a package that is coincident with the main sequence and D=1 indicating a package that is as far from the main sequence as possible. </p> | |||
| </body> | |||
| @@ -416,7 +416,7 @@ Creates an html file that contains a link to all package links in overview-packa | |||
| <xsl:template match="JDepend/Packages/Package" mode="all.packages.link"> | |||
| <tr> | |||
| <td nowrap="nowrap"> | |||
| <a href="overview-packages.html#PK{@name}" target="classFrame"> | |||
| <a href="overview-packages.html#PK{@name}" target="classFrame"> | |||
| <xsl:value-of select="@name"/> | |||
| </a> | |||
| </td> | |||
| @@ -465,7 +465,7 @@ Creates an html file that contains a link to all package links in overview-cycle | |||
| <xsl:template match="JDepend/Cycles/Package" mode="all.cycles"> | |||
| <tr> | |||
| <td nowrap="nowrap"> | |||
| <a href="overview-cycles.html#CY{@Name}" target="classFrame"><xsl:value-of select="@Name"/></a> | |||
| <a href="overview-cycles.html#CY{@Name}" target="classFrame"><xsl:value-of select="@Name"/></a> | |||
| </td> | |||
| </tr> | |||
| </xsl:template> | |||
| @@ -476,7 +476,7 @@ Creates an html file that contains a link to all package links in overview-cycle | |||
| <table width="100%"> | |||
| <tr> | |||
| <td align="left"></td> | |||
| <td align="right">Designed for use with <a href="http://www.clarkware.com/software/JDepend.html">JDepend</a> and <a href="http://jakarta.apache.org">Ant</a>.</td> | |||
| <td align="right">Designed for use with <a href="http://www.clarkware.com/software/JDepend.html">JDepend</a> and <a href="http://jakarta.apache.org">Ant</a>.</td> | |||
| </tr> | |||
| </table> | |||
| <hr size="1"/> | |||
| @@ -18,13 +18,13 @@ | |||
| limitations under the License. | |||
| --> | |||
| <xsl:output method="html" indent="yes" encoding="US-ASCII"/> | |||
| <xsl:output method="html" indent="yes" encoding="US-ASCII"/> | |||
| <xsl:template match="JDepend"> | |||
| <html> | |||
| <head> | |||
| <title>JDepend Analysis</title> | |||
| <style type="text/css"> | |||
| body { | |||
| font:normal 68% verdana,arial,helvetica; | |||
| @@ -41,7 +41,7 @@ | |||
| table.details tr td{ | |||
| background:#eeeee0; | |||
| } | |||
| p { | |||
| line-height:1.5em; | |||
| margin-top:0.5em; margin-bottom:1.0em; | |||
| @@ -76,22 +76,21 @@ | |||
| text-align:right; | |||
| } | |||
| </style> | |||
| </head> | |||
| <body> | |||
| <!--h1>JDepend Report</h1> | |||
| <ul> | |||
| <xsl:for-each select="./Packages/Package"> | |||
| <xsl:sort select="@name"/> | |||
| <xsl:sort select="@name"/> | |||
| <li><xsl:value-of select="@name"/></li> | |||
| </xsl:for-each> | |||
| </ul--> | |||
| <h1><a name="top">JDepend Analysis</a></h1> | |||
| <p align="right">Designed for use with <a href="http://www.clarkware.com/software/JDepend.html">JDepend</a> and <a href="https://ant.apache.org">Ant</a>.</p> | |||
| <hr size="2" /> | |||
| <hr size="2"/> | |||
| <table width="100%"><tr><td> | |||
| <a name="NVsummary"><h2>Summary</h2></a> | |||
| </td><td align="right"> | |||
| @@ -100,7 +99,7 @@ | |||
| [<a href="#NVcycles">cycles</a>] | |||
| [<a href="#NVexplanations">explanations</a>] | |||
| </td></tr></table> | |||
| <table width="100%" class="details"> | |||
| <tr> | |||
| <th>Package</th> | |||
| @@ -112,7 +111,6 @@ | |||
| <th><a href="#EXabstractness">Abstractness</a></th> | |||
| <th><a href="#EXinstability">Instability</a></th> | |||
| <th><a href="#EXdistance">Distance</a></th> | |||
| </tr> | |||
| <xsl:for-each select="./Packages/Package"> | |||
| <xsl:if test="count(error) = 0"> | |||
| @@ -132,8 +130,6 @@ | |||
| <td align="right"><xsl:value-of select="Stats/A"/></td> | |||
| <td align="right"><xsl:value-of select="Stats/I"/></td> | |||
| <td align="right"><xsl:value-of select="Stats/D"/></td> | |||
| </tr> | |||
| </xsl:if> | |||
| </xsl:for-each> | |||
| @@ -148,7 +144,7 @@ | |||
| </xsl:if> | |||
| </xsl:for-each> | |||
| </table> | |||
| <table width="100%"><tr><td> | |||
| <a name="NVpackages"><h2>Packages</h2></a> | |||
| </td><td align="right"> | |||
| @@ -157,12 +153,12 @@ | |||
| [<a href="#NVcycles">cycles</a>] | |||
| [<a href="#NVexplanations">explanations</a>] | |||
| </td></tr></table> | |||
| <xsl:for-each select="./Packages/Package"> | |||
| <xsl:if test="count(error) = 0"> | |||
| <h3><a><xsl:attribute name="name">PK<xsl:value-of select="@name"/></xsl:attribute> | |||
| <xsl:value-of select="@name"/></a></h3> | |||
| <table width="100%"><tr> | |||
| <td><a href="#EXafferent">Afferent Couplings</a>: <xsl:value-of select="Stats/Ca"/></td> | |||
| <td><a href="#EXefferent">Efferent Couplings</a>: <xsl:value-of select="Stats/Ce"/></td> | |||
| @@ -170,7 +166,7 @@ | |||
| <td><a href="#EXinstability">Instability</a>: <xsl:value-of select="Stats/I"/></td> | |||
| <td><a href="#EXdistance">Distance</a>: <xsl:value-of select="Stats/D"/></td> | |||
| </tr></table> | |||
| <table width="100%" class="details"> | |||
| <tr> | |||
| <th>Abstract Classes</th> | |||
| @@ -221,7 +217,7 @@ | |||
| </table> | |||
| </xsl:if> | |||
| </xsl:for-each> | |||
| <table width="100%"><tr><td> | |||
| <a name="NVcycles"><h2>Cycles</h2></a> | |||
| </td><td align="right"> | |||
| @@ -230,7 +226,7 @@ | |||
| [<a href="#NVcycles">cycles</a>] | |||
| [<a href="#NVexplanations">explanations</a>] | |||
| </td></tr></table> | |||
| <xsl:if test="count(Cycles/Package) = 0"> | |||
| <p>There are no cyclic dependancies.</p> | |||
| </xsl:if> | |||
| @@ -240,7 +236,7 @@ | |||
| <xsl:value-of select="."/><br/> | |||
| </xsl:for-each></p> | |||
| </xsl:for-each> | |||
| <table width="100%"><tr><td> | |||
| <a name="NVexplanations"><h2>Explanations</h2></a> | |||
| </td><td align="right"> | |||
| @@ -249,26 +245,26 @@ | |||
| [<a href="#NVcycles">cycles</a>] | |||
| [<a href="#NVexplanations">explanations</a>] | |||
| </td></tr></table> | |||
| <p>The following explanations are for quick reference and are lifted directly from the original <a href="http://www.clarkware.com/software/JDepend.html">JDepend documentation</a>.</p> | |||
| <h3><a name="EXnumber">Number of Classes</a></h3> | |||
| <p>The number of concrete and abstract classes (and interfaces) in the package is an indicator of the extensibility of the package.</p> | |||
| <h3><a name="EXafferent">Afferent Couplings</a></h3> | |||
| <p>The number of other packages that depend upon classes within the package is an indicator of the package's responsibility. </p> | |||
| <h3><a name="EXefferent">Efferent Couplings</a></h3> | |||
| <p>The number of other packages that the classes in the package depend upon is an indicator of the package's independence. </p> | |||
| <h3><a name="EXabstractness">Abstractness</a></h3> | |||
| <h3><a name="EXabstractness">Abstractness</a></h3> | |||
| <p>The ratio of the number of abstract classes (and interfaces) in the analyzed package to the total number of classes in the analyzed package. </p> | |||
| <p>The range for this metric is 0 to 1, with A=0 indicating a completely concrete package and A=1 indicating a completely abstract package. </p> | |||
| <h3><a name="EXinstability">Instability</a></h3> | |||
| <p>The ratio of efferent coupling (Ce) to total coupling (Ce / (Ce + Ca)). This metric is an indicator of the package's resilience to change. </p> | |||
| <p>The range for this metric is 0 to 1, with I=0 indicating a completely stable package and I=1 indicating a completely instable package. </p> | |||
| <p>The range for this metric is 0 to 1, with I=0 indicating a completely stable package and I=1 indicating a completely unstable package. </p> | |||
| <h3><a name="EXdistance">Distance</a></h3> | |||
| <p>The perpendicular distance of a package from the idealized line A + I = 1. This metric is an indicator of the package's balance between abstractness and stability. </p> | |||
| <p>A package squarely on the main sequence is optimally balanced with respect to its abstractness and stability. Ideal packages are either completely abstract and stable (x=0, y=1) or completely concrete and instable (x=1, y=0). </p> | |||
| <p>A package squarely on the main sequence is optimally balanced with respect to its abstractness and stability. Ideal packages are either completely abstract and stable (x=0, y=1) or completely concrete and unstable (x=1, y=0). </p> | |||
| <p>The range for this metric is 0 to 1, with D=0 indicating a package that is coincident with the main sequence and D=1 indicating a package that is as far from the main sequence as possible. </p> | |||
| </body> | |||
| </html> | |||
| </xsl:template> | |||
| @@ -20,9 +20,9 @@ | |||
| <target name="setUp"> | |||
| <mkdir dir="${output}"/> | |||
| <!-- this property can be overriden programatically in the Java test case --> | |||
| <!-- this property can be overridden programmatically in the Java test case --> | |||
| <property name="timeToWait" value="10"/> | |||
| <!-- this property can be overriden programatically in the Java test case --> | |||
| <!-- this property can be overridden programmatically in the Java test case --> | |||
| <property name="logFile" value="${output}/spawn.log"/> | |||
| <property environment="env"/> | |||
| <!-- UNIX --> | |||
| @@ -19,11 +19,11 @@ | |||
| <!-- | |||
| /* | |||
| * Since the initial version of this file was deveolped on the clock on | |||
| * Since the initial version of this file was developed on the clock on | |||
| * an NSF grant I should say the following boilerplate: | |||
| * | |||
| * This material is based upon work supported by the National Science | |||
| * Foundaton under Grant No. EIA-0196404. Any opinions, findings, and | |||
| * Foundation under Grant No. EIA-0196404. Any opinions, findings, and | |||
| * conclusions or recommendations expressed in this material are those | |||
| * of the author and do not necessarily reflect the views of the | |||
| * National Science Foundation. | |||
| @@ -33,44 +33,44 @@ | |||
| <project name="symlink-test" basedir="." default="all"> | |||
| <!-- | |||
| <!-- | |||
| Since the symlink task and some of these targets rely on | |||
| calls to exec, it may be possible for the JVM to outrun the | |||
| calls to exec, it may be possible for the JVM to outrun the | |||
| execution of the command line system calls, so this value is | |||
| the number of seconds we give the operating system to | |||
| catch up before executing a task that depends on the | |||
| catch up before executing a task that depends on the | |||
| completion of previous tasks. This delay is also added to | |||
| the end of each target so junit doesn't go testing things | |||
| before they have finnished (hopefully). Tweak if needed. | |||
| before they have finished (hopefully). Tweak if needed. | |||
| --> | |||
| <property name="delay" value="0"/> | |||
| <import file="../../../buildfiletest-base.xml"/> | |||
| <target name="setUp"> | |||
| <mkdir dir="${output}" /> | |||
| <mkdir dir="${output}"/> | |||
| </target> | |||
| <target name="all" | |||
| depends="setUp, test-single, test-delete, test-record, test-recreate, tearDown"/> | |||
| <!-- test for action = single --> | |||
| <!-- | |||
| <!-- | |||
| Creates: | |||
| File: ${output}/symlink.test | |||
| Link: ${output}/singletest | |||
| --> | |||
| <target name="test-single"> | |||
| <touch file="${output}/symlink.test"/> | |||
| <symlink resource="${output}/symlink.test" | |||
| link="${output}/singletest" | |||
| <symlink resource="${output}/symlink.test" | |||
| link="${output}/singletest" | |||
| failonerror="yes"/> | |||
| <sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | |||
| <available file="${output}/symlink.test" | |||
| <available file="${output}/symlink.test" | |||
| property="test.single.file.created"/> | |||
| <available file="${output}/singletest" | |||
| <available file="${output}/singletest" | |||
| property="test.single.link.created"/> | |||
| </target> | |||
| @@ -78,7 +78,7 @@ | |||
| <!-- test for action = delete (no calls to command line so no sleep) --> | |||
| <!-- | |||
| <!-- | |||
| Creates: | |||
| (none) | |||
| Deletes: | |||
| @@ -87,8 +87,8 @@ | |||
| <target name="test-delete"> | |||
| <touch file="${output}/symlink.test"/> | |||
| <symlink resource="${output}/symlink.test" | |||
| link="${output}/singletest" | |||
| <symlink resource="${output}/symlink.test" | |||
| link="${output}/singletest" | |||
| failonerror="yes"/> | |||
| <sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | |||
| @@ -96,19 +96,19 @@ | |||
| <symlink action="delete" link="${output}/symlink.test" failonerror="no"/> | |||
| <sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | |||
| <available file="${output}/symlink.test" | |||
| <available file="${output}/symlink.test" | |||
| property="test.delete.file.still.there"/> | |||
| <available file="${output}/singletest" | |||
| <available file="${output}/singletest" | |||
| property="test.delete.link.still.there" | |||
| value="ERROR: link deletion failed"/> | |||
| </target> | |||
| <!-- test for action = record --> | |||
| <!-- | |||
| <!-- | |||
| Creates: | |||
| Dir: ${output}/symtest1 | |||
| Dir: ${output}/symtest1/symtest2 | |||
| @@ -143,22 +143,22 @@ | |||
| <touch file="${output}/symtest1/symtest3/fileB"/> | |||
| <touch file="${output}/symtest1/symtest3/fileC"/> | |||
| <symlink resource="${output}/symtest1/file1" | |||
| link="${output}/symtest1/link1" | |||
| failonerror="no" /> | |||
| <symlink resource="${output}/symtest1/symtest2/file2" | |||
| link="${output}/symtest1/link2" | |||
| failonerror="no" /> | |||
| <symlink resource="${output}/symtest1/symtest2/file2" | |||
| link="${output}/symtest1/symtest2/link3" | |||
| failonerror="no" /> | |||
| <symlink resource="${output}/symtest1/file1" | |||
| link="${output}/symtest1/link1" | |||
| failonerror="no"/> | |||
| <symlink resource="${output}/symtest1/symtest2/file2" | |||
| link="${output}/symtest1/link2" | |||
| failonerror="no"/> | |||
| <symlink resource="${output}/symtest1/symtest2/file2" | |||
| link="${output}/symtest1/symtest2/link3" | |||
| failonerror="no"/> | |||
| <symlink resource="${output}/symtest1/symtest3" | |||
| link="${output}/symtest1/dirlink" | |||
| failonerror="no" /> | |||
| <symlink resource="${output}/symtest1/symtest3" | |||
| failonerror="no"/> | |||
| <symlink resource="${output}/symtest1/symtest3" | |||
| link="${output}/symtest1/dirlink2" | |||
| failonerror="no"/> | |||
| <symlink resource="${output}/symtest1/symtest3" | |||
| <symlink resource="${output}/symtest1/symtest3" | |||
| link="${output}/symtest1/dirlink3" | |||
| failonerror="no"/> | |||
| @@ -217,7 +217,7 @@ | |||
| <!-- this is redundant for this test, but used in the recreate test --> | |||
| <available file="${output}/symtest1/dirlink2" | |||
| <available file="${output}/symtest1/dirlink2" | |||
| property="test.record.dirlink2.created"/> | |||
| <!-- Test to see if the linkfiles were created --> | |||
| @@ -239,7 +239,7 @@ | |||
| <!-- test for action = recreate --> | |||
| <!-- | |||
| <!-- | |||
| Deletes: | |||
| Link: ${output}/symtest1/link1==>${output}/symtest1/file1 | |||
| Link: ${output}/symtest1/link2==>${output}/symtest1/symtest2/file2 | |||
| @@ -278,7 +278,7 @@ | |||
| <sleep seconds="${delay}"/> <!-- make sure OS has time to catch up --> | |||
| <symlink resource="${output}/symtest1/symtest2" | |||
| <symlink resource="${output}/symtest1/symtest2" | |||
| link="${output}/symtest1/dirlink3" | |||
| failonerror="no"/> | |||
| @@ -321,7 +321,7 @@ | |||
| property="test.recreate.dirlink.recreated"/> | |||
| <!-- this should not get set --> | |||
| <available file="${output}/symtest1/symtest3/symtest3" | |||
| <available file="${output}/symtest1/symtest3/symtest3" | |||
| property="test.recreate.dirlink2.recreated.twice" | |||
| value="ERROR: dirlink2 was created a second time (bug 25181)"/> | |||
| @@ -329,13 +329,13 @@ | |||
| <sleep seconds="${delay}"/> <!-- make sure OS has time to do the execs --> | |||
| <available file="${output}/symtest1/symtest3/WhereAmI" | |||
| <available file="${output}/symtest1/symtest3/WhereAmI" | |||
| property="test.recreate.dirlink3.was.altered"/> | |||
| </target> | |||
| <!-- actually tests the symlink methods in FileUtils, but this | |||
| testfixture already has all the necessary envirnment in place | |||
| test fixture already has all the necessary environment in place | |||
| --> | |||
| <target name="test-fileutils" depends="setUp"> | |||
| <mkdir dir="${output}/dir1"/> | |||
| @@ -16,15 +16,14 @@ | |||
| limitations under the License. | |||
| --> | |||
| <!-- | |||
| Invalid test XML file without any schema refeferences | |||
| <!-- | |||
| Invalid test XML file without any schema references | |||
| --> | |||
| <doc> | |||
| <section title="endpiece"> | |||
| With a little luck, the network will pick me up. | |||
| With a little luck, the network will pick me up. | |||
| This is Ripley - last survivor of The Nostromo - signing off. | |||
| </section> | |||
| <invalidelement/> | |||
| </doc> | |||
| @@ -16,13 +16,12 @@ | |||
| limitations under the License. | |||
| --> | |||
| <!-- | |||
| Test XML file without any schema refeferences | |||
| <!-- | |||
| Test XML file without any schema references | |||
| --> | |||
| <doc> | |||
| <section title="endpiece"> | |||
| With a little luck, the network will pick me up. | |||
| With a little luck, the network will pick me up. | |||
| This is Ripley - last survivor of The Nostromo - signing off. | |||
| </section> | |||
| </doc> | |||
| @@ -27,175 +27,171 @@ | |||
| includes="*.java" | |||
| source="${source}" | |||
| debug="true" | |||
| destdir="${output}" | |||
| /> | |||
| destdir="${output}"/> | |||
| </target> | |||
| <property name="src.dir" location="assertions"/> | |||
| <property name="classname" value="AssertionMain"/> | |||
| <property name="test.classname" value="AssertionTest"/> | |||
| <path id="assert.classpath"> | |||
| <pathelement location="${output}"/> | |||
| </path> | |||
| </path> | |||
| <!-- if per-class assertions work, this run asserts --> | |||
| <target name="test-classname" depends="setUp"> | |||
| <java fork="true" failonerror="true" | |||
| classname="${classname}" | |||
| classpathref="assert.classpath"> | |||
| classname="${classname}" | |||
| classpathref="assert.classpath"> | |||
| <assertions enablesystemassertions="true"> | |||
| <enable class="${classname}" /> | |||
| <enable class="${classname}"/> | |||
| </assertions> | |||
| </java> | |||
| </target> | |||
| <!-- if package works, this run asserts --> | |||
| <target name="test-package" depends="setUp"> | |||
| <java fork="true" failonerror="true" | |||
| classname="${classname}" | |||
| classpathref="assert.classpath"> | |||
| <assertions enableSystemAssertions="false" > | |||
| <enable package="..." /> | |||
| <java fork="true" failonerror="true" | |||
| classname="${classname}" | |||
| classpathref="assert.classpath"> | |||
| <assertions enableSystemAssertions="false"> | |||
| <enable package="..."/> | |||
| </assertions> | |||
| </java> | |||
| </target> | |||
| <!-- this test should run the app successfully --> | |||
| <target name="test-empty-assertions" depends="setUp"> | |||
| <java fork="true" failonerror="true" | |||
| classname="${classname}" | |||
| classpathref="assert.classpath"> | |||
| <java fork="true" failonerror="true" | |||
| classname="${classname}" | |||
| classpathref="assert.classpath"> | |||
| <assertions/> | |||
| </java> | |||
| </target> | |||
| </target> | |||
| <!-- this test should run the app successfully --> | |||
| <target name="test-disable" depends="setUp"> | |||
| <java fork="true" failonerror="true" | |||
| classname="${classname}" | |||
| classpathref="assert.classpath"> | |||
| <assertions enableSystemAssertions="false" > | |||
| <enable package="..." /> | |||
| <disable class="${classname}" /> | |||
| classname="${classname}" | |||
| classpathref="assert.classpath"> | |||
| <assertions enableSystemAssertions="false"> | |||
| <enable package="..."/> | |||
| <disable class="${classname}"/> | |||
| </assertions> | |||
| </java> | |||
| </target> | |||
| </target> | |||
| <!-- repeated settigns result in the last declaration winning | |||
| except that the rule 'classes win over packages takes priority | |||
| this run will assert --> | |||
| <!-- repeated settings result in the last declaration winning | |||
| except that the rule 'classes win over packages takes priority | |||
| this run will assert --> | |||
| <target name="test-override" depends="setUp"> | |||
| <java fork="true" failonerror="true" | |||
| classname="${classname}" | |||
| classpathref="assert.classpath"> | |||
| <assertions enableSystemAssertions="false" > | |||
| <enable package="..." /> | |||
| <disable class="${classname}" /> | |||
| <enable class="${classname}" /> | |||
| <disable package="..." /> | |||
| classname="${classname}" | |||
| classpathref="assert.classpath"> | |||
| <assertions enableSystemAssertions="false"> | |||
| <enable package="..."/> | |||
| <disable class="${classname}"/> | |||
| <enable class="${classname}"/> | |||
| <disable package="..."/> | |||
| </assertions> | |||
| </java> | |||
| </target> | |||
| </target> | |||
| <!-- repeated settigns result in the last declaration winning; | |||
| this run will not assert --> | |||
| <!-- repeated settings result in the last declaration winning; | |||
| this run will not assert --> | |||
| <target name="test-override2" depends="setUp"> | |||
| <java fork="true" failonerror="true" | |||
| classname="${classname}" | |||
| classpathref="assert.classpath"> | |||
| <assertions enableSystemAssertions="false" > | |||
| <enable package="..." /> | |||
| <enable class="${classname}" /> | |||
| <disable class="${classname}" /> | |||
| classname="${classname}" | |||
| classpathref="assert.classpath"> | |||
| <assertions enableSystemAssertions="false"> | |||
| <enable package="..."/> | |||
| <enable class="${classname}"/> | |||
| <disable class="${classname}"/> | |||
| </assertions> | |||
| </java> | |||
| </target> | |||
| </target> | |||
| <!-- if references work, this run asserts --> | |||
| <target name="test-references"> | |||
| <assertions id="project.assertions" > | |||
| <enable package="org.apache.test" /> | |||
| <disable package="org.apache.log4j"/> | |||
| <enable package="..."/> | |||
| </assertions> | |||
| <assertions id="project.assertions"> | |||
| <enable package="org.apache.test"/> | |||
| <disable package="org.apache.log4j"/> | |||
| <enable package="..."/> | |||
| </assertions> | |||
| <java fork="true" failonerror="true" | |||
| classname="${classname}" | |||
| classpathref="assert.classpath"> | |||
| classname="${classname}" | |||
| classpathref="assert.classpath"> | |||
| <assertions refid="project.assertions"/> | |||
| </java> | |||
| </target> | |||
| <!-- when fork=false; we need to reject the construct --> | |||
| <target name="test-nofork" depends="setUp"> | |||
| <java fork="false" failonerror="true" | |||
| classname="${classname}" | |||
| classpathref="assert.classpath"> | |||
| classname="${classname}" | |||
| classpathref="assert.classpath"> | |||
| <assertions enablesystemassertions="true"> | |||
| <enable class="${classname}" /> | |||
| <enable class="${classname}"/> | |||
| </assertions> | |||
| </java> | |||
| </target> | |||
| </target> | |||
| <!-- this throws a build error --> | |||
| <target name="test-multiple-assertions" depends="setUp"> | |||
| <java fork="true" failonerror="true" | |||
| classname="${classname}" | |||
| classpathref="assert.classpath"> | |||
| classname="${classname}" | |||
| classpathref="assert.classpath"> | |||
| <assertions enablesystemassertions="true"> | |||
| <enable class="${classname}" /> | |||
| <enable class="${classname}"/> | |||
| </assertions> | |||
| <assertions/> | |||
| </java> | |||
| </target> | |||
| </target> | |||
| <!-- should throw a build exception --> | |||
| <target name="test-reference-abuse" depends="setUp"> | |||
| <assertions id="project.assertions2" > | |||
| <enable package="org.apache.test" /> | |||
| <disable package="org.apache.log4j"/> | |||
| <enable package="..."/> | |||
| </assertions> | |||
| <assertions id="project.assertions2"> | |||
| <enable package="org.apache.test"/> | |||
| <disable package="org.apache.log4j"/> | |||
| <enable package="..."/> | |||
| </assertions> | |||
| <java fork="true" failonerror="true" | |||
| classname="${classname}" | |||
| classpathref="assert.classpath"> | |||
| classname="${classname}" | |||
| classpathref="assert.classpath"> | |||
| <assertions refid="project.assertions2"> | |||
| <disable class="${classname}" /> | |||
| </assertions> | |||
| <disable class="${classname}"/> | |||
| </assertions> | |||
| </java> | |||
| </target> | |||
| </target> | |||
| <target name="test-junit" depends="setUp"> | |||
| <junit fork="true" | |||
| haltonerror="true" haltonfailure="true" | |||
| > | |||
| <junit fork="true" | |||
| haltonerror="true" haltonfailure="true"> | |||
| <classpath> | |||
| <path refid="assert.classpath"/> | |||
| </classpath> | |||
| <formatter type="plain" usefile="false"/> | |||
| <assertions > | |||
| <enable class="${test.classname}" /> | |||
| </assertions> | |||
| <formatter type="plain" usefile="false"/> | |||
| <assertions> | |||
| <enable class="${test.classname}"/> | |||
| </assertions> | |||
| <test name="${test.classname}"/> | |||
| </junit> | |||
| </target> | |||
| <!-- This is here to show that setting it as a property works | |||
| so there is some defect in pass-on of assertions that | |||
| is causing the problem --> | |||
| so there is some defect in pass-on of assertions that | |||
| is causing the problem --> | |||
| <target name="test-junit-manual-setup" depends="setUp"> | |||
| <junit fork="true" | |||
| haltonerror="true" haltonfailure="true" | |||
| > | |||
| <junit fork="true" | |||
| haltonerror="true" haltonfailure="true"> | |||
| <classpath> | |||
| <path refid="assert.classpath"/> | |||
| </classpath> | |||
| <formatter type="plain" usefile="false"/> | |||
| <formatter type="plain" usefile="false"/> | |||
| <test name="${test.classname}"/> | |||
| <jvmarg value="-ea:AssertionTest"/> | |||
| </junit> | |||
| </target> | |||
| </target> | |||
| </project> | |||
| @@ -25,40 +25,40 @@ | |||
| </target> | |||
| <property name="etc.dir" value=".."/> | |||
| <property name="test.dir" | |||
| value="${output}/selectortest"/> | |||
| value="${output}/selectortest"/> | |||
| <property name="testregexpsrc.dir" | |||
| value="${output}/regexpseltestsrc"/> | |||
| value="${output}/regexpseltestsrc"/> | |||
| <property name="testregexpdest.dir" | |||
| value="${output}/regexpseltestdest"/> | |||
| value="${output}/regexpseltestdest"/> | |||
| <property name="mirror.dir" | |||
| value="${output}/selectortest2"/> | |||
| value="${output}/selectortest2"/> | |||
| <target name="setupfiles"> | |||
| <mkdir dir="${test.dir}" /> | |||
| <mkdir dir="${test.dir}/zip" /> | |||
| <mkdir dir="${test.dir}/tar" /> | |||
| <mkdir dir="${test.dir}/tar/gz" /> | |||
| <mkdir dir="${test.dir}/tar/bz2" /> | |||
| <mkdir dir="${test.dir}"/> | |||
| <mkdir dir="${test.dir}/zip"/> | |||
| <mkdir dir="${test.dir}/tar"/> | |||
| <mkdir dir="${test.dir}/tar/gz"/> | |||
| <mkdir dir="${test.dir}/tar/bz2"/> | |||
| <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.md5" | |||
| tofile="${test.dir}/asf-logo.gif.md5" /> | |||
| tofile="${test.dir}/asf-logo.gif.md5"/> | |||
| <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.bz2" | |||
| tofile="${test.dir}/asf-logo.gif.bz2" /> | |||
| tofile="${test.dir}/asf-logo.gif.bz2"/> | |||
| <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.gz" | |||
| tofile="${test.dir}/asf-logo.gif.gz" /> | |||
| tofile="${test.dir}/asf-logo.gif.gz"/> | |||
| <copy file="${etc.dir}/taskdefs/expected/copy.filterset.filtered" | |||
| tofile="${test.dir}/copy.filterset.filtered" /> | |||
| tofile="${test.dir}/copy.filterset.filtered"/> | |||
| <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.zip" | |||
| tofile="${test.dir}/zip/asf-logo.gif.zip" /> | |||
| tofile="${test.dir}/zip/asf-logo.gif.zip"/> | |||
| <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.tar" | |||
| tofile="${test.dir}/tar/asf-logo.gif.tar" /> | |||
| tofile="${test.dir}/tar/asf-logo.gif.tar"/> | |||
| <copy file="${etc.dir}/taskdefs/expected/asf-logo-huge.tar.gz" | |||
| tofile="${test.dir}/tar/asf-logo-huge.tar.gz" /> | |||
| tofile="${test.dir}/tar/asf-logo-huge.tar.gz"/> | |||
| <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.tar.gz" | |||
| tofile="${test.dir}/tar/gz/asf-logo.gif.tar.gz" /> | |||
| tofile="${test.dir}/tar/gz/asf-logo.gif.tar.gz"/> | |||
| <copy file="${etc.dir}/taskdefs/expected/asf-logo.gif.tar.bz2" | |||
| tofile="${test.dir}/tar/bz2/asf-logo.gif.tar.bz2" /> | |||
| tofile="${test.dir}/tar/bz2/asf-logo.gif.tar.bz2"/> | |||
| <copy file="${etc.dir}/taskdefs/expected/asf-logo-huge.tar.bz2" | |||
| tofile="${test.dir}/tar/bz2/asf-logo-huge.tar.bz2" /> | |||
| tofile="${test.dir}/tar/bz2/asf-logo-huge.tar.bz2"/> | |||
| <!-- Make linefeeds consistent between platforms --> | |||
| <fixcrlf srcdir="${test.dir}" includes="*.filtered" eol="lf"/> | |||
| <!-- Set a known base time for all files --> | |||
| @@ -69,23 +69,23 @@ | |||
| </touch> | |||
| <!-- Then adjust individual ones --> | |||
| <touch file="${test.dir}/asf-logo.gif.bz2" | |||
| datetime="01/01/2001 12:00 AM"/> | |||
| datetime="01/01/2001 12:00 AM"/> | |||
| <touch file="${test.dir}/asf-logo.gif.gz" | |||
| datetime="04/15/2002 2:30 PM"/> | |||
| datetime="04/15/2002 2:30 PM"/> | |||
| <touch file="${test.dir}/zip/asf-logo.gif.zip" | |||
| datetime="05/10/2002 2:30 PM"/> | |||
| datetime="05/10/2002 2:30 PM"/> | |||
| <touch file="${test.dir}/tar/asf-logo.gif.tar" | |||
| datetime="05/10/2002 2:29 PM"/> | |||
| datetime="05/10/2002 2:29 PM"/> | |||
| <touch file="${test.dir}/tar/asf-logo-huge.tar.gz" | |||
| datetime="05/10/2002 2:29 AM"/> | |||
| datetime="05/10/2002 2:29 AM"/> | |||
| </target> | |||
| <target name="mirrorfiles"> | |||
| <mkdir dir="${mirror.dir}" /> | |||
| <mkdir dir="${mirror.dir}/zip" /> | |||
| <mkdir dir="${mirror.dir}/tar" /> | |||
| <mkdir dir="${mirror.dir}/tar/gz" /> | |||
| <mkdir dir="${mirror.dir}/tar/bz2" /> | |||
| <mkdir dir="${mirror.dir}"/> | |||
| <mkdir dir="${mirror.dir}/zip"/> | |||
| <mkdir dir="${mirror.dir}/tar"/> | |||
| <mkdir dir="${mirror.dir}/tar/gz"/> | |||
| <mkdir dir="${mirror.dir}/tar/bz2"/> | |||
| <touch file="${mirror.dir}/asf-logo.gif.md5"/> | |||
| <touch file="${mirror.dir}/asf-logo.gif.bz2"/> | |||
| <touch file="${mirror.dir}/zip/asf-logo.gif.zip"/> | |||
| @@ -97,18 +97,18 @@ | |||
| </target> | |||
| <target name="containsregexp"> | |||
| <mkdir dir="${testregexpsrc.dir}" /> | |||
| <mkdir dir="${testregexpdest.dir}" /> | |||
| <mkdir dir="${testregexpsrc.dir}"/> | |||
| <mkdir dir="${testregexpdest.dir}"/> | |||
| <!-- Make two test files, shouldcopy.txt will get selected if everything works | |||
| shouldnotcopy.txt will not get selected for copy. The test looks to see | |||
| that only one file is copied | |||
| --> | |||
| <echo message="Some testregexp text 2.0" file="${testregexpsrc.dir}/shouldcopy.txt" /> | |||
| <echo message="Some testregexp text 20" file="${testregexpsrc.dir}/shouldnotcopy.txt" /> | |||
| <echo message="Some testregexp text 2.0" file="${testregexpsrc.dir}/shouldcopy.txt"/> | |||
| <echo message="Some testregexp text 20" file="${testregexpsrc.dir}/shouldnotcopy.txt"/> | |||
| <copy todir="${testregexpdest.dir}"> | |||
| <fileset dir="${testregexpsrc.dir}"> | |||
| <include name="*.txt" /> | |||
| <containsregexp expression="[0-9]\.[0,1,2]" /> | |||
| <include name="*.txt"/> | |||
| <containsregexp expression="[0-9]\.[0,1,2]"/> | |||
| </fileset> | |||
| </copy> | |||
| </target> | |||
| @@ -185,7 +185,7 @@ | |||
| <copy todir="${test.dir}/to-1"> | |||
| <fileset dir="${test.dir}/src"> | |||
| <modified cache="propertyfile" algorithm="hashvalue" update="true"> | |||
| <param name="cache.cachefile" value="core.cache.properties" /> | |||
| <param name="cache.cachefile" value="core.cache.properties"/> | |||
| </modified> | |||
| </fileset> | |||
| </copy> | |||
| @@ -193,7 +193,7 @@ | |||
| <copy todir="${test.dir}/to-2"> | |||
| <fileset dir="${test.dir}/src"> | |||
| <modified cache="propertyfile" algorithm="hashvalue" update="true"> | |||
| <param name="cache.cachefile" value="core.cache.properties" /> | |||
| <param name="cache.cachefile" value="core.cache.properties"/> | |||
| </modified> | |||
| </fileset> | |||
| </copy> | |||
| @@ -203,7 +203,7 @@ | |||
| <copy todir="${test.dir}/to-3"> | |||
| <fileset dir="${test.dir}/src"> | |||
| <modified cache="propertyfile" algorithm="hashvalue" update="true"> | |||
| <param name="cache.cachefile" value="core.cache.properties" /> | |||
| <param name="cache.cachefile" value="core.cache.properties"/> | |||
| </modified> | |||
| </fileset> | |||
| </copy> | |||
| @@ -251,11 +251,9 @@ | |||
| <property name="pkg.live" value="org.apache.tools.ant.types.selectors.modifiedselector"/> | |||
| <property name="pkg.test" value="org.apache.tools.ant.types.selectors"/> | |||
| <fileset id="fs.mod" dir="${test.dir}/src"> | |||
| <modified | |||
| algorithmclass="${pkg.test}.MockAlgorithm" | |||
| cacheclass="${pkg.test}.MockCache" | |||
| comparatorclass="${pkg.test}.MockComparator" | |||
| > | |||
| <modified algorithmclass="${pkg.test}.MockAlgorithm" | |||
| cacheclass="${pkg.test}.MockCache" | |||
| comparatorclass="${pkg.test}.MockComparator"> | |||
| <classpath> | |||
| <pathelement location="${build.tests.value}"/> | |||
| </classpath> | |||
| @@ -267,15 +265,15 @@ | |||
| </target> | |||
| <target name="modifiedselectortest-ResourceSimple"> | |||
| <fail message="Didnt get the required numbers of Resources."> | |||
| <fail message="Didn't get the required numbers of Resources."> | |||
| <condition> | |||
| <not> | |||
| <resourcecount when="equal" count="3"> | |||
| <restrict> | |||
| <resources> | |||
| <file file="foo" /> | |||
| <resource name="foo" /> | |||
| <file file="foo" basedir="${basedir}" /> | |||
| <file file="foo"/> | |||
| <resource name="foo"/> | |||
| <file file="foo" basedir="${basedir}"/> | |||
| </resources> | |||
| <modified selres="true" xmlns="antlib:org.apache.tools.ant.types.resources.selectors"/> | |||
| </restrict> | |||
| @@ -292,7 +290,7 @@ | |||
| <resourcecount when="equal" count="1"> | |||
| <restrict> | |||
| <resources> | |||
| <resource name="notExisting" /> | |||
| <resource name="notExisting"/> | |||
| </resources> | |||
| <modified selres="true" xmlns="antlib:org.apache.tools.ant.types.resources.selectors"/> | |||
| </restrict> | |||
| @@ -309,7 +307,7 @@ | |||
| <resourcecount when="equal" count="0"> | |||
| <restrict> | |||
| <resources> | |||
| <resource name="notExisting" /> | |||
| <resource name="notExisting"/> | |||
| </resources> | |||
| <modified selres="false" xmlns="antlib:org.apache.tools.ant.types.resources.selectors"/> | |||
| </restrict> | |||
| @@ -337,20 +335,20 @@ | |||
| </resourcecount> | |||
| </not> | |||
| </condition> | |||
| </fail> | |||
| </fail> | |||
| </sequential> | |||
| </macrodef> | |||
| <!-- select first time and create cachefile --> | |||
| <check count="14" message="Initial set of files not ok."/> | |||
| <!-- check second time: nothing should be selected --> | |||
| <check count="0" message="Selected files but shouldnt."/> | |||
| <check count="0" message="Selected files but shouldn't."/> | |||
| <!-- 'modify' the source files --> | |||
| <antcall target="modifiedselectortest-scenario-makeDirty"/> | |||
| <!-- copy third time: only the files with new CONTENT should be copied --> | |||
| <check count="2" message="Didnt select the 2 modified files."/> | |||
| </target> | |||
| <check count="2" message="Didn't select the 2 modified files."/> | |||
| </target> | |||
| </project> | |||
| @@ -588,7 +588,7 @@ public final class Diagnostics { | |||
| long drift = filetime - now; | |||
| tempFile.delete(); | |||
| out.print("Temp dir is writeable"); | |||
| out.print("Temp dir is writable"); | |||
| if (total != TEST_FILE_SIZE * KILOBYTE) { | |||
| out.println(", but seems to be full. Wrote " | |||
| + (TEST_FILE_SIZE * KILOBYTE) | |||
| @@ -574,7 +574,7 @@ public class Ant extends Task { | |||
| log("Adding clone of reference " + oldKey, Project.MSG_DEBUG); | |||
| } | |||
| } catch (Exception e) { | |||
| // not Clonable | |||
| // not Cloneable | |||
| } | |||
| if (copy instanceof ProjectComponent) { | |||
| @@ -663,7 +663,7 @@ public class Checksum extends MatchingTask implements Condition { | |||
| /** | |||
| * Get the default value - CHECKSUM. | |||
| * @return the defaul value. | |||
| * @return the default value. | |||
| */ | |||
| public static FormatElement getDefault() { | |||
| FormatElement e = new FormatElement(); | |||
| @@ -217,7 +217,7 @@ public class Exec extends Task { | |||
| /** | |||
| * Log an output message. | |||
| * @param line the line to putput | |||
| * @param line the line to output | |||
| * @param messageLevel the level of logging - ignored | |||
| * if output is going to a file | |||
| */ | |||
| @@ -602,7 +602,7 @@ public class SignJar extends AbstractJarSignerTask { | |||
| * either file doesn't exist, or the destfile has an out of date timestamp, | |||
| * then the return value is false.</p> | |||
| * | |||
| * <p>If we are signing ourself, the check {@link #isSigned(File)} is used to | |||
| * <p>If we are signing ourselves, the check {@link #isSigned(File)} is used to | |||
| * trigger the process.</p> | |||
| * | |||
| * @param jarFile the unsigned jar file | |||
| @@ -2136,7 +2136,7 @@ public class Zip extends MatchingTask { | |||
| /** | |||
| * Policy for creation of Unicode extra fields: never, always or | |||
| * not-encodeable. | |||
| * not-encodable. | |||
| * | |||
| * @since Ant 1.8.0 | |||
| */ | |||
| @@ -78,7 +78,7 @@ public class IsReachable extends ProjectComponent implements Condition { | |||
| /** Error message when url and host are specified. */ | |||
| public static final String ERROR_BOTH_TARGETS | |||
| = "Both url and host have been specified"; | |||
| /** Error message when no reachably test avail. */ | |||
| /** Error message when no reachability test avail. */ | |||
| public static final String MSG_NO_REACHABLE_TEST | |||
| = "cannot do a proper reachability test on this Java version"; | |||
| /** Error message when an invalid url is used. */ | |||
| @@ -121,7 +121,7 @@ public class IsReachable extends ProjectComponent implements Condition { | |||
| } | |||
| /** | |||
| * emptyness test | |||
| * emptiness test | |||
| * | |||
| * @param string param to check | |||
| * | |||
| @@ -389,7 +389,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool { | |||
| try { | |||
| handler = getDescriptorHandler(config.srcDir); | |||
| // Retreive the files to be added to JAR from EJB descriptor | |||
| // Retrieve the files to be added to JAR from EJB descriptor | |||
| Hashtable<String, File> ejbFiles = parseEjbFiles(descriptorFileName, saxParser); | |||
| // Add any support classes specified in the build file | |||
| @@ -688,7 +688,7 @@ public class GenericDeploymentTool implements EJBDeploymentTool { | |||
| * If the file does not exist the global manifest from the config is used | |||
| * otherwise the default Ant manifest will be used. | |||
| * | |||
| * @param prefix the prefix where to llook for the manifest file based on | |||
| * @param prefix the prefix where to look for the manifest file based on | |||
| * the naming convention. | |||
| * | |||
| * @return the manifest file or null if the manifest file does not exist | |||
| @@ -768,7 +768,7 @@ public class JonasDeploymentTool extends GenericDeploymentTool { | |||
| } | |||
| /* ----------------------------------------------------------------------------------- */ | |||
| /* utilitary methods */ | |||
| /* utility methods */ | |||
| /* ----------------------------------------------------------------------------------- */ | |||
| /** | |||
| @@ -798,7 +798,7 @@ public class JonasDeploymentTool extends GenericDeploymentTool { | |||
| /** | |||
| * Add a file to the a given hashtable. If the file is a directory, add | |||
| * recursivly all the files inside to the hashtable. | |||
| * recursively all the files inside to the hashtable. | |||
| * | |||
| * @param file the file to add. | |||
| * @param rootDir the current sub-directory to scan. | |||
| @@ -153,7 +153,7 @@ public class WLJspc extends MatchingTask { | |||
| args[j++] = "-docroot"; | |||
| args[j++] = sourceDirectory.getAbsolutePath().trim(); | |||
| args[j++] = "-keepgenerated"; | |||
| //Call compiler as class... dont want to fork again | |||
| //Call compiler as class... don't want to fork again | |||
| //Use classic compiler -- can be parameterised? | |||
| args[j++] = "-compilerclass"; | |||
| args[j++] = "sun.tools.javac.Main"; | |||
| @@ -106,7 +106,7 @@ public class JUnitLauncherTask extends Task { | |||
| if (this.classPath == null) { | |||
| // create a "wrapper" path which can hold on to multiple | |||
| // paths that get passed to this method (if at all the task in the build is | |||
| // configured with multiple classpaht elements) | |||
| // configured with multiple classpath elements) | |||
| this.classPath = new Path(getProject()); | |||
| } | |||
| this.classPath.add(path); | |||
| @@ -31,7 +31,7 @@ import java.util.List; | |||
| final class TestRequest implements AutoCloseable { | |||
| private final TestDefinition ownerTest; | |||
| private final LauncherDiscoveryRequestBuilder discoveryRequest; | |||
| private final List<Closeable> closables = new ArrayList<>(); | |||
| private final List<Closeable> closeables = new ArrayList<>(); | |||
| private final List<TestResultFormatter> interestedInSysOut = new ArrayList<>(); | |||
| private final List<TestResultFormatter> interestedInSysErr = new ArrayList<>(); | |||
| @@ -53,7 +53,7 @@ final class TestRequest implements AutoCloseable { | |||
| if (closeable == null) { | |||
| return; | |||
| } | |||
| this.closables.add(closeable); | |||
| this.closeables.add(closeable); | |||
| } | |||
| void addSysOutInterest(final TestResultFormatter out) { | |||
| @@ -81,10 +81,10 @@ final class TestRequest implements AutoCloseable { | |||
| } | |||
| public void close() throws Exception { | |||
| if (this.closables.isEmpty()) { | |||
| if (this.closeables.isEmpty()) { | |||
| return; | |||
| } | |||
| for (final Closeable closeable : closables) { | |||
| for (final Closeable closeable : closeables) { | |||
| closeable.close(); | |||
| } | |||
| } | |||
| @@ -827,7 +827,7 @@ public class FTP extends Task implements FTPTaskConfig { | |||
| if (!isCaseSensitive() && (remoteSystemCaseSensitive | |||
| || !remoteSensitivityChecked)) { | |||
| currentPathElement = | |||
| findPathElementCaseUnsensitive(this.curpwd, | |||
| findPathElementCaseInsensitive(this.curpwd, | |||
| currentPathElement); | |||
| if (currentPathElement == null) { | |||
| return; | |||
| @@ -854,7 +854,7 @@ public class FTP extends Task implements FTPTaskConfig { | |||
| * @param soughtPathElement what is being sought | |||
| * @return the first file found or null if not found | |||
| */ | |||
| private String findPathElementCaseUnsensitive(String parentPath, | |||
| private String findPathElementCaseInsensitive(String parentPath, | |||
| String soughtPathElement) { | |||
| // we are already in the right path, so the second parameter | |||
| // is false | |||
| @@ -729,7 +729,7 @@ public class FTPTaskMirrorImpl implements FTPTaskMirror { | |||
| if (!this.client.changeWorkingDirectory(currentPathElement)) { | |||
| if (!isCaseSensitive() && (remoteSystemCaseSensitive | |||
| || !remoteSensitivityChecked)) { | |||
| currentPathElement = findPathElementCaseUnsensitive(this.curpwd, | |||
| currentPathElement = findPathElementCaseInsensitive(this.curpwd, | |||
| currentPathElement); | |||
| if (currentPathElement == null) { | |||
| return; | |||
| @@ -752,7 +752,7 @@ public class FTPTaskMirrorImpl implements FTPTaskMirror { | |||
| * @param soughtPathElement what is being sought | |||
| * @return the first file found or null if not found | |||
| */ | |||
| private String findPathElementCaseUnsensitive(String parentPath, | |||
| private String findPathElementCaseInsensitive(String parentPath, | |||
| String soughtPathElement) { | |||
| // we are already in the right path, so the second parameter | |||
| // is false | |||
| @@ -772,7 +772,7 @@ public abstract class MSVSS extends Task implements MSVSSConstants { | |||
| } | |||
| /** | |||
| * Extension of EnumeratedAttribute to hold the values for writable filess. | |||
| * Extension of EnumeratedAttribute to hold the values for writable files. | |||
| */ | |||
| public static class WritableFiles extends EnumeratedAttribute { | |||
| /** | |||
| @@ -95,7 +95,7 @@ public class MSVSSCHECKIN extends MSVSS { | |||
| } | |||
| /** | |||
| * Autoresponce behaviour. Valid options are Y and N. | |||
| * Autoresponse behaviour. Valid options are Y and N. | |||
| * | |||
| * @param response The auto response value. | |||
| */ | |||
| @@ -118,7 +118,7 @@ import org.xml.sax.XMLReader; | |||
| public class XMLCatalog extends DataType | |||
| implements EntityResolver, URIResolver { | |||
| /** helper for some File.toURL connversions */ | |||
| /** helper for some File.toURL conversions */ | |||
| private static final FileUtils FILE_UTILS = FileUtils.getFileUtils(); | |||
| //-- Fields ---------------------------------------------------------------- | |||
| @@ -1228,7 +1228,7 @@ public class FileUtils { | |||
| * @return true if path starts with leading; false otherwise. | |||
| * @since Ant 1.10.5 | |||
| * @throws IOException if resolveSymlinks is true and invoking | |||
| * getCanonicaPath on either argument throws an exception | |||
| * getCanonicalPath on either argument throws an exception | |||
| */ | |||
| public boolean isLeadingPath(File leading, File path, boolean resolveSymlinks) | |||
| throws IOException { | |||
| @@ -105,7 +105,7 @@ public class ProxySetup { | |||
| owner.log(message, Project.MSG_DEBUG); | |||
| System.setProperty(USE_SYSTEM_PROXIES, proxies); | |||
| } catch (SecurityException e) { | |||
| //log security exceptions and continue; it aint that | |||
| //log security exceptions and continue; it ain't that | |||
| //important and may be quite common running Ant embedded. | |||
| owner.log("Security Exception when " + message); | |||
| } | |||
| @@ -660,10 +660,10 @@ public class ZipOutputStream extends FilterOutputStream { | |||
| } | |||
| private boolean isZip64Required(ZipEntry entry1, Zip64Mode requestedMode) { | |||
| return requestedMode == Zip64Mode.Always || isTooLageForZip32(entry1); | |||
| return requestedMode == Zip64Mode.Always || isTooLargeForZip32(entry1); | |||
| } | |||
| private boolean isTooLageForZip32(ZipEntry zipArchiveEntry) { | |||
| private boolean isTooLargeForZip32(ZipEntry zipArchiveEntry) { | |||
| return zipArchiveEntry.getSize() >= ZIP64_MAGIC | |||
| || zipArchiveEntry.getCompressedSize() >= ZIP64_MAGIC; | |||
| } | |||
| @@ -61,7 +61,7 @@ if classes \= '' then classpath = prepend(classpath classes) | |||
| classpath = prepend(classpath ANT_HOME || '\lib\ant-launcher.jar') | |||
| 'SET CLASSPATH=' || classpath | |||
| /* Setting classpathes, options and arguments */ | |||
| /* Setting classpaths, options and arguments */ | |||
| envset = _getenv_('envset') | |||
| if cp\='' then interpret 'call "' || envset || '"' '"; CLASSPATH"' '"' || cp || '"' | |||
| if lcp\='' then interpret 'call "' || envset || '"' '"; LOCALCLASSPATH"' '"' || lcp || '"' | |||
| @@ -37,7 +37,7 @@ not interpreted | |||
| the parameters are changed to name=expanded_name | |||
| Other options have optional equal sign. If it is found, only the part after | |||
| the equal sign will be oprionally expanded. | |||
| the equal sign will be optionally expanded. | |||
| If the parameter is the minus sign, the next parameter will not be expanded. | |||
| If the parameter is a single dot, it will be replaced with the value of the | |||
| @@ -79,7 +79,7 @@ | |||
| <a:something a:foo="bar"/> | |||
| </echoxml> | |||
| <au:assertResourceContains resource="${file}" value="a:something"/> | |||
| <au:assertFalse message="Didn't expecte ${file} to contain antlib:a"> | |||
| <au:assertFalse message="Didn't expect ${file} to contain antlib:a"> | |||
| <resourcecontains resource="${file}" substring="antlib:a"/> | |||
| </au:assertFalse> | |||
| </target> | |||
| @@ -197,7 +197,7 @@ public class UnzipTest { | |||
| /** | |||
| * assert that a file exists, relative to the project | |||
| * @param message message if there is no mpatch | |||
| * @param message message if there is no match | |||
| * @param filename filename to resolve against the project | |||
| */ | |||
| private void assertFileExists(String message, String filename) { | |||
| @@ -141,7 +141,7 @@ public class TraXLiaisonTest extends AbstractXSLTLiaisonTest implements XSLTLogg | |||
| liaison.setStylesheet(xsl); | |||
| liaison.addParam("param", "value"); | |||
| File in = getFile("/taskdefs/optional/xsltliaison-in.xml"); | |||
| // test for 10 consecutives transform | |||
| // test for 10 consecutive transforms | |||
| for (int i = 0; i < 50; i++) { | |||
| File out = new File("xsltliaison" + i + ".tmp"); | |||
| try { | |||
| @@ -81,9 +81,9 @@ public class ReaderInputStreamTest { | |||
| } | |||
| @Test | |||
| public void testPreample() { | |||
| public void testPreamble() { | |||
| byte[] bytes = "".getBytes(StandardCharsets.UTF_16); | |||
| System.out.println("Preample len is " + bytes.length); | |||
| System.out.println("Preamble len is " + bytes.length); | |||
| } | |||
| @Test | |||