Skip to content

Commit b52d6ba

Browse files
committed
Disambiguate markup for parsing.
Add closing tags, explicitly mark paragraphs, use an XML-compatible `DOCTYPE` declaration (while retaining SGML compatibility), and generally avoid HTML quirks to enable parsing with a variety of parsers. The resulting document has been tested with Racket’s `xml`; Guile’s `(sxml simple)`; Python’s `html.parser`, `lxml`, `lxml-xml`, and `html5lib`; various browsers; and the human eye.
1 parent 5b2bb35 commit b52d6ba

File tree

1 file changed

+29
-29
lines changed

1 file changed

+29
-29
lines changed

srfi-64.html

Lines changed: 29 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
1-
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
1+
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
22
<html lang="en">
33
<head>
44
<title>SRFI 64: A Scheme API for test suites</title>
55
<meta charset="utf-8" />
66
<meta name="viewport" content="width=device-width, initial-scale=1" />
77
<link rel="stylesheet" href="https://srfi.schemers.org/srfi.css" type="text/css" />
8-
<link href="/favicon.png" rel="icon" sizes="192x192" type="image/png">
8+
<link href="/favicon.png" rel="icon" sizes="192x192" type="image/png" />
99
<style type="text/css">
1010
/* So var inside pre gets same font as var in paragraphs. */
1111
var { font-family: monospace; }
@@ -25,11 +25,11 @@ <h2>Status</h2>
2525
<li>Received: 2005-01-07</li>
2626
<li>Draft: 2005-01-28--2005-03-28</li>
2727
<li>Revised: <a href="https://srfi.schemers.org/srfi-64/srfi-64-1.3.html">2005-10-18</a>
28-
<li>Revised: <a href="https://srfi.schemers.org/srfi-64/srfi-64-1.5.html">2006-02-24</a>
29-
<li>Final: <a href="https://srfi.schemers.org/srfi-64/srfi-64-1.6.html">2006-06-18</a></li>
28+
</li><li>Revised: <a href="https://srfi.schemers.org/srfi-64/srfi-64-1.5.html">2006-02-24</a>
29+
</li><li>Final: <a href="https://srfi.schemers.org/srfi-64/srfi-64-1.6.html">2006-06-18</a></li>
3030
<li>Revised to fix errata: 2016-08-11</li>
3131
</ul>
32-
</p>
32+
3333

3434

3535
<h2>Abstract</h2>
@@ -343,7 +343,7 @@ <h4>Handling set-up and cleanup</h4>
343343
(close-output-port f)))
344344
</pre>
345345
<p><b>Erratum note:</b> <a href="https://github.com/scheme-requests-for-implementation/srfi-64/blob/4470ffdec71b1cf61633b664958a3ce5e6997710/srfi-64.html">Earlier versions</a> had a non-working example.
346-
346+
</p>
347347
<!--
348348
<h3>Test suites</h3>
349349
<p>
@@ -393,7 +393,7 @@ <h4>Test specifiers</h4>
393393
returned by <code>test-runner-test-name</code>) is <code>equals?</code> to
394394
<var>name</var>.</p>
395395
<p>
396-
<code>(<b>test-match-nth</b> <var>n</var> [<var>count</var>])</code><br/>
396+
<code>(<b>test-match-nth</b> <var>n</var> [<var>count</var>])</code><br />
397397
This evaluates to a <em>stateful</em> predicate: A counter keeps track of
398398
how many times it has been called.
399399
The predicate matches the <var>n</var>'th time it is called
@@ -512,8 +512,8 @@ <h3>Test-runner</h3>
512512
Create a new test-runner. Equivalent to
513513
<code>((test-runner-factory))</code>.</p>
514514
<p>
515-
<code>(<b>test-runner-factory</b>)</code><br/>
516-
<code>(<b>test-runner-factory</b> <var>factory</var>)</code><br/>
515+
<code>(<b>test-runner-factory</b>)</code><br />
516+
<code>(<b>test-runner-factory</b> <var>factory</var>)</code><br />
517517
Get or set the current test-runner factory.
518518
A factory is a zero-argument function that creates a new test-runner.
519519
The default value is <code>test-runner-simple</code>,
@@ -556,15 +556,15 @@ <h4>Result kind</h4>
556556
<dt><code>'skip</code></dt><dd>The test was skipped.</dd>
557557
</dl>
558558
<p>
559-
<code>(<b>test-result-kind</b> [<var>runner</var>])</code><br/>
559+
<code>(<b>test-result-kind</b> [<var>runner</var>])</code><br />
560560
Return one of the above result codes from the most recent tests.
561561
Returns <code>#f</code> if no tests have been run yet.
562562
If we've started on a new test, but don't have a result yet,
563563
then the result kind is <code>'xfail</code> is the test is expected to fail,
564564
<code>'skip</code> is the test is supposed to be skipped,
565565
or <code>#f</code> otherwise.</p>
566566
<p>
567-
<code>(<b>test-passed?</b> [<var>runner</var>])</code><br/>
567+
<code>(<b>test-passed?</b> [<var>runner</var>])</code><br />
568568
True if the value of <code>(test-result-kind [<var>runner</var>])</code>
569569
is one of <code>'pass</code> or <code>'xpass</code>.
570570
This is a convenient shorthand that might be useful
@@ -599,7 +599,7 @@ <h4>Test result properties</h4>
599599
The implementation automatically calls <code>test-result-clear</code>
600600
at the start of a <code>test-assert</code> and similar procedures.</p>
601601
<p>
602-
<code>(<b>test-result-alist</b> <var>runner</var>)</code><br/>
602+
<code>(<b>test-result-alist</b> <var>runner</var>)</code><br />
603603
Returns an association list of the current result properties.
604604
It is unspecified if the result shares state with the test-runner.
605605
The result should not be modified, on the other hand the result
@@ -615,8 +615,8 @@ <h4>Standard result properties</h4>
615615
<dl>
616616
<dt><code>'result-kind</code></dt>
617617
<dd>The result kind, as defined previously.
618-
This is the only mandatory result property.<br/>
619-
<code>(test-result-kind <var>runner</var>)</code> is equivalent to:<br/>
618+
This is the only mandatory result property.<br />
619+
<code>(test-result-kind <var>runner</var>)</code> is equivalent to:<br />
620620
<code>(test-result-ref <var>runner</var> 'result-kind)</code>
621621
</dd>
622622
<dt><code>'source-file</code></dt>
@@ -650,7 +650,7 @@ <h4>Call-back functions</h4>
650650
<p>
651651
To define (set) the callback function for <var>event</var> use the following expression.
652652
(This is normally done when initializing a test-runner.)
653-
<br/>
653+
<br />
654654
<code>(test-runner-on-<var>event</var>! <var>runner</var> <var>event-function</var>)</code></p>
655655
<p>
656656
An <var>event-function</var> takes a test-runner argument, and possibly other arguments, depending on the <var>event</var>.</p>
@@ -659,57 +659,57 @@ <h4>Call-back functions</h4>
659659
<code>(test-runner-on-<var>event</var> <var>runner</var>)</code></p>
660660
<p>
661661
To extract call the callback function for <var>event</var> use the following expression.
662-
(This is normally done by the implementation core.)<br/>
662+
(This is normally done by the implementation core.)<br />
663663
<code>((test-runner-on-<var>event</var> <var>runner</var>) <var>runner</var> <var>other-args</var> ...)</code></p>
664664
<p>
665665
The following call-back hooks are available.</p>
666666
<p>
667-
<code>(<b>test-runner-on-test-begin</b> <var>runner</var>)</code><br/>
668-
<code>(<b>test-runner-on-test-begin!</b> <var>runner</var> <var>on-test-begin-function</var>)</code><br/>
667+
<code>(<b>test-runner-on-test-begin</b> <var>runner</var>)</code><br />
668+
<code>(<b>test-runner-on-test-begin!</b> <var>runner</var> <var>on-test-begin-function</var>)</code><br />
669669
<code>(<var>on-test-begin-function</var> <var>runner</var>)</code><br />
670670
The <var>on-test-begin-function</var> is called at the start of an
671671
individual testcase, before the test expression (and expected value) are
672672
evaluated.
673673
</p>
674674
<p>
675-
<code>(<b>test-runner-on-test-end</b> <var>runner</var>)</code><br/>
676-
<code>(<b>test-runner-on-test-end!</b> <var>runner</var> <var>on-test-end-function</var>)</code><br/>
675+
<code>(<b>test-runner-on-test-end</b> <var>runner</var>)</code><br />
676+
<code>(<b>test-runner-on-test-end!</b> <var>runner</var> <var>on-test-end-function</var>)</code><br />
677677
<code>(<var>on-test-end-function</var> <var>runner</var>)</code><br />
678678
The <var>on-test-end-function</var> is called at the end of an
679679
individual testcase, when the result of the test is available.</p>
680680
<p>
681-
<code>(<b>test-runner-on-group-begin</b> <var>runner</var>)</code><br/>
682-
<code>(<b>test-runner-on-group-begin!</b> <var>runner</var> <var>on-group-begin-function</var>)</code><br/>
681+
<code>(<b>test-runner-on-group-begin</b> <var>runner</var>)</code><br />
682+
<code>(<b>test-runner-on-group-begin!</b> <var>runner</var> <var>on-group-begin-function</var>)</code><br />
683683
<code>(<var>on-group-begin-function</var> <var>runner</var> <var>suite-name</var> <var>count</var>)</code><br />
684684
The <var>on-group-begin-function</var> is called by a <code>test-begin</code>,
685685
including at the start of a <code>test-group</code>.
686686
The <var>suite-name</var> is a Scheme string,
687687
and <var>count</var> is an integer or <code>#f</code>.</p>
688688
<p>
689-
<code>(<b>test-runner-on-group-end</b> <var>runner</var>)</code><br/>
690-
<code>(<b>test-runner-on-group-end!</b> <var>runner</var> <var>on-group-end-function</var>)</code><br/>
689+
<code>(<b>test-runner-on-group-end</b> <var>runner</var>)</code><br />
690+
<code>(<b>test-runner-on-group-end!</b> <var>runner</var> <var>on-group-end-function</var>)</code><br />
691691
<code>(<var>on-group-end-function</var> <var>runner</var>)</code><br />
692692
The <var>on-group-end-function</var> is called by a <code>test-end</code>,
693693
including at the end of a <code>test-group</code>.</p>
694694
<p>
695695
<code>(<b>test-runner-on-bad-count</b> <var>runner</var>)</code><br />
696696
<code>(<b>test-runner-on-bad-count!</b> <var>runner</var> <var>on-bad-count-function</var>)</code><br />
697-
<code>(<var>on-bad-count-function</var> <var>runner</var> <var>actual-count</var> <var>expected-count</var>)</code><br />
697+
<code>(<var>on-bad-count-function</var> <var>runner</var> <var>actual-count</var> <var>expected-count</var>)</code><br />
698698
Called from <code>test-end</code> (before the <var>on-group-end-function</var>
699699
is called) if an <var>expected-count</var> was specified by the matching
700700
<code>test-begin</code> and the <var>expected-count</var> does not match
701701
the <var>actual-count</var> of tests actually executed or skipped.</p>
702702
<p>
703703
<code>(<b>test-runner-on-bad-end-name</b> <var>runner</var>)</code><br />
704704
<code>(<b>test-runner-on-bad-end-name!</b> <var>runner</var> <var>on-bad-end-name-function</var>)</code><br />
705-
<code>(<var>on-bad-end-name-function</var> <var>runner</var> <var>begin-name</var> <var>end-name</var>)</code><br />
705+
<code>(<var>on-bad-end-name-function</var> <var>runner</var> <var>begin-name</var> <var>end-name</var>)</code><br />
706706
Called from <code>test-end</code> (before the <var>on-group-end-function</var>
707707
is called) if a <var>suite-name</var> was specified, and it did not that the
708708
name in the matching <code>test-begin</code>.</p>
709709
<p>
710710
<code>(<b>test-runner-on-final</b> <var>runner</var>)</code><br />
711711
<code>(<b>test-runner-on-final!</b> <var>runner</var> <var>on-final-function</var>)</code><br />
712-
<code>(<var>on-final-function</var> <var>runner</var>)</code><br />
712+
<code>(<var>on-final-function</var> <var>runner</var>)</code><br />
713713
The <var>on-final-function</var> takes one parameter (a test-runner)
714714
and typically displays a summary (count) of the tests.
715715
The <var>on-final-function</var> is called after called the
@@ -725,8 +725,8 @@ <h4>Call-back functions</h4>
725725
<code>(<b>test-on-test-end-simple</b> <var>runner</var>)</code><br />
726726
<code>(<b>test-on-group-begin-simple</b> <var>runner</var> <var>suite-name</var> <var>count</var>)</code><br />
727727
<code>(<b>test-on-group-end-simple</b> <var>runner</var>)</code><br />
728-
<code>(<b>test-on-bad-count-simple</b> <var>runner</var> <var>actual-count</var> <var>expected-count</var>)</code><br />
729-
<code>(<b>test-on-bad-end-name-simple</b> <var>runner</var> <var>begin-name</var> <var>end-name</var>)</code><br />
728+
<code>(<b>test-on-bad-count-simple</b> <var>runner</var> <var>actual-count</var> <var>expected-count</var>)</code><br />
729+
<code>(<b>test-on-bad-end-name-simple</b> <var>runner</var> <var>begin-name</var> <var>end-name</var>)</code><br />
730730
You can call those if you want to write your own test-runner.</p>
731731

732732
<h4>Test-runner components</h4>

0 commit comments

Comments
 (0)