The Perl Toolchain Summit needs more sponsors. If your company depends on Perl, please support this very important event.
<html xmlns:v="urn:schemas-microsoft-com:vml"
xmlns:o="urn:schemas-microsoft-com:office:office"
xmlns:w="urn:schemas-microsoft-com:office:word"
xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=ProgId content=Word.Document>
<meta name=Generator content="Microsoft Word 9">
<meta name=Originator content="Microsoft Word 9">
<link rel=File-List href="./AllFiles-Dateien/filelist.xml">
<link rel=Edit-Time-Data href="./AllFiles-Dateien/editdata.mso">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]-->
<title>Wiki: All Files</title>
<!--[if gte mso 9]><xml>
 <o:DocumentProperties>
  <o:Author>Martin Busik</o:Author>
  <o:LastAuthor>Martin Busik</o:LastAuthor>
  <o:Revision>5</o:Revision>
  <o:Created>2006-04-28T20:39:00Z</o:Created>
  <o:LastSaved>2006-04-28T22:51:00Z</o:LastSaved>
  <o:Pages>2</o:Pages>
  <o:Words>543</o:Words>
  <o:Characters>3100</o:Characters>
  <o:Company>Hogwarts</o:Company>
  <o:Lines>25</o:Lines>
  <o:Paragraphs>6</o:Paragraphs>
  <o:CharactersWithSpaces>3807</o:CharactersWithSpaces>
  <o:Version>9.3821</o:Version>
 </o:DocumentProperties>
</xml><![endif]-->
<style>
<!--
 /* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
	{mso-style-parent:"";
	margin:0cm;
	margin-bottom:.0001pt;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
a:link, span.MsoHyperlink
	{color:#D06040;
	text-decoration:underline;
	text-underline:single;}
a:visited, span.MsoHyperlinkFollowed
	{color:#806040;
	text-decoration:underline;
	text-underline:single;}
p
	{margin-right:0cm;
	mso-margin-top-alt:auto;
	mso-margin-bottom-alt:auto;
	margin-left:0cm;
	mso-pagination:widow-orphan;
	font-size:12.0pt;
	font-family:"Times New Roman";
	mso-fareast-font-family:"Times New Roman";}
@page Section1
	{size:595.3pt 841.9pt;
	margin:70.85pt 70.85pt 2.0cm 70.85pt;
	mso-header-margin:35.4pt;
	mso-footer-margin:35.4pt;
	mso-paper-source:0;}
div.Section1
	{page:Section1;}
 /* List Definitions */
@list l0
	{mso-list-id:632642135;
	mso-list-type:hybrid;
	mso-list-template-ids:789492156 538639908 1936480154 170156276 -651514298 506492924 1783692772 -1619593608 -81744146 -2002328694;}
@list l0:level1
	{mso-level-number-format:bullet;
	mso-level-text:\F0B7;
	mso-level-tab-stop:36.0pt;
	mso-level-number-position:left;
	text-indent:-18.0pt;
	mso-ansi-font-size:10.0pt;
	font-family:Symbol;}
ol
	{margin-bottom:0cm;}
ul
	{margin-bottom:0cm;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1027"/>
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1"/>
 </o:shapelayout></xml><![endif]-->
</head>

<body bgcolor=white lang=EN-GB link="#d06040" vlink="#806040" style='tab-interval:
36.0pt'>

<div class=Section1>

<h1>All Files<o:p></o:p></h1>

<p class=MsoNormal><wiki>This is the first of a suite of fixtures that make up
the AllPairsExample. It and AllCombinations are warmups for AllPairs testing. </p>


<div class=MsoNormal align=center style='text-align:center'>

<hr size=2 width="100%" align=center>

</div>


<p>A project can expect to have dozens to hundreds of files filled with
specifications, explainations and associated tests. The AllFiles fixture seeks
out these files and runs them all, one after another, and reports a
&quot;rolled-up&quot; accounting of their results. </p>

<p>Like the ExampleTests fixture, the AllFiles fixture will take as its tabular
input a list of files to be run. But here, unlike that fixture, we will expand
wildcard characters in order to find all the tests in a particular place,
whether we know what they are now or not. </p>

<p>Here are wildcard path expressions that find lots of other tests. Try runing
them with <a href="run.cgi">http:run.cgi</a>. </p>

<table border=1 cellspacing=0 cellpadding=0 style='mso-cellspacing:0cm;
 mso-padding-alt:2.25pt 2.25pt 2.25pt 2.25pt'>
 <tr>
  <td colspan=2 style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>eg.AllFiles </p>
  </td>
 </tr>
 <tr>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>input/*Example.html </p>
  </td>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>&nbsp;</p>
  </td>
 </tr>
 <tr>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>input/Music*.html </p>
  </td>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>&nbsp;</p>
  </td>
 </tr>
</table>

<p>The AllFiles fixture adds rows to this table for each of the files it finds.
The first column is the expanded file name, the second, the resulting counts
for that run. We mark the results &quot;wrong&quot; if there are any wrongs or
exceptions. That means the above tests will never pass because we have
intentional errors in these files. </p>

<p>Use AllFiles when you expect all your tests to pass and only want to know
when this expectation is unfounded. AllFiles does not create output files for
the tests it runs unless there is a problem. Problem run results are saved and
cited along with the counts in a FileFootnote that looks like [1], [2], and so
on. </p>

<p>Test counts can sore when we start running files over and over.
LessonsLearned advise us to not take big &quot;right&quot; counts too seriously
so we don't. In fact a file with 100 right and no wrong counts as 1 right from
this fixtures perspective. You can see this in the <em>counts</em> reported in
the summary: </p>

<table border=1 cellspacing=0 cellpadding=0 style='mso-cellspacing:0cm;
 mso-padding-alt:2.25pt 2.25pt 2.25pt 2.25pt'>
 <tr>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>fit.Summary </p>
  </td>
 </tr>
</table>

<p>(Note: See more complete summary below.) </p>

<p>You will also note that the fixture reports total counts for the files it
runs under <em>counts run</em> in the summary because, lessons not
withstanding, we like to know. </p>


<div class=MsoNormal align=center style='text-align:center'>

<hr size=2 width="100%" align=center>

</div>


<p><strong>Implementation</strong> </p>

<p>The fixture distinguishes expandings the path specifications (doRow) from
running the list of files produced (doFiles). This fixture does the files as
they are expanded. The AllCombinations and AllPairs refinements expand all rows
before they start doing. </p>

<p>The path expansion only expands one wildcard character, star (*), which
means <em>any characters</em> here. The star can appear anywhere in a name and
in any or all names that make up a path. But the expansion we've coded has the
restriction that only one star is expanded in any component of the path. </p>

<p>The expanded file names will refer to files that may or may not use the
&lt;wiki&gt; tag convention (See WikiRunner). This fixture is happy to run
either file format and lets the presence of a &lt;wiki&gt; tag in the file
indicate the need for its processing. </p>

<p>See the source. </p>

<ul type=disc>
 <li class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto;
     mso-list:l0 level1 lfo3;tab-stops:list 36.0pt'><a
     href="Release\Source\eg\AllFiles.java">http:Release/Source/eg/AllFiles.java</a>
     </li>
</ul>

<p class=MsoNormal>This class includes an implementation of FileFootnote that
is discussed on that page. </p>


<div class=MsoNormal align=center style='text-align:center'>

<hr size=2 width="100%" align=center>

</div>


<table border=1 cellspacing=0 cellpadding=0 style='mso-cellspacing:0cm;
 mso-padding-alt:2.25pt 2.25pt 2.25pt 2.25pt'>
 <tr>
  <td colspan=2 style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>eg.AllFilesExpand </p>
  </td>
 </tr>
 <tr>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>path </p>
  </td>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>expansion() </p>
  </td>
 </tr>
 <tr>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>input/*Example.html </p>
  </td>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>CalculatorExample.html,MusicExample.html,NetworkExample.html,WebPageExample.html
  </p>
  </td>
 </tr>
 <tr>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal style='text-align:justify'>input/Music*.html </p>
  </td>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>MusicExample.html,MusicExampleWithErrors.html </p>
  </td>
 </tr>
 <tr>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>input/AllPairs/magnitude/*.html </p>
  </td>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>180+30.html,30.html,360+30.html,90-30.html </p>
  </td>
 </tr>
 <tr>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>input/AllPairs/sign/*.html </p>
  </td>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>change-sign.html,multiply.html,no-change.html </p>
  </td>
 </tr>
 <tr>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>input/AllPairs/function/*.html </p>
  </td>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>cosine.html,sine.html </p>
  </td>
 </tr>
 <tr>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>input/AllPairs/function/*sine.html </p>
  </td>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>cosine.html,sine.html </p>
  </td>
 </tr>
 <tr>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>input/AllPairs/function/*.xml </p>
  </td>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>&nbsp;</p>
  </td>
 </tr>
 <tr>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>input/AllPairs/func* </p>
  </td>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>&nbsp;</p>
  </td>
 </tr>
 <tr>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>input/AllPairs/* </p>
  </td>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>&nbsp;</p>
  </td>
 </tr>
 <tr>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>input/AllPairs* </p>
  </td>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>&nbsp;</p>
  </td>
 </tr>
 <tr>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>input/* </p>
  </td>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>&nbsp;</p>
  </td>
 </tr>
</table>

<p>We've added some more tests to this document so the totals in the summary
increase. </p>

<table border=1 cellspacing=0 cellpadding=0 style='mso-cellspacing:0cm;
 mso-padding-alt:2.25pt 2.25pt 2.25pt 2.25pt'>
 <tr>
  <td style='padding:2.25pt 2.25pt 2.25pt 2.25pt'>
  <p class=MsoNormal>fit.Summary </p>
  </td>
 </tr>
</table>


<div class=MsoNormal align=center style='text-align:center'>

<hr size=2 width="100%" align=center>

</div>

</wiki>

<p class=MsoNormal>Last edited April 20, 2003 </p>

</div>

</body>

</html>