Skip to content

Commit 5b2bb35

Browse files
committed
Edit markup based on current "srfi-template.html".
- Change title and author format. - Fix heading levels. - Normalize stylesheet, favicon, and lang. - Remove some obsolete CSS.
1 parent 27a5e37 commit 5b2bb35

File tree

1 file changed

+34
-41
lines changed

1 file changed

+34
-41
lines changed

srfi-64.html

Lines changed: 34 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,24 @@
11
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2-
<html>
2+
<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" />
7-
<link rel="stylesheet" href="/srfi.css" type="text/css" />
7+
<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">
89
<style type="text/css">
9-
div.title h1 { font-size: small; color: blue }
10-
div.title { font-size: xx-large; color: blue; font-weight: bold }
11-
h1 { font-size: x-large; color: blue }
12-
h2 { font-size: large; color: blue }
1310
/* So var inside pre gets same font as var in paragraphs. */
1411
var { font-family: monospace; }
1512
</style>
1613
</head>
1714

1815
<body>
19-
<div class="title">
20-
<H1>Title</H1>
21-
A Scheme API for test suites
22-
</div>
16+
<h1><a href="https://srfi.schemers.org/"><img class="srfi-logo" src="https://srfi.schemers.org/srfi-logo.svg" alt="SRFI surfboard logo" /></a>64: A Scheme API for test suites</h1>
2317

24-
<H1>Author</H1>
25-
<p>Per Bothner
18+
<p>by Per Bothner<br />
2619
<code><a href="mailto:[email protected]">&lt;[email protected]&gt;</a></code></p>
2720

28-
<H1>Status</H1>
21+
<h2>Status</h2>
2922

3023
<p>This SRFI is currently in <em>final</em> status. Here is <a href="https://srfi.schemers.org/srfi-process.html">an explanation</a> of each status that a SRFI can hold. To provide input on this SRFI, please send email to <code><a href="mailto:srfi+minus+64 +at+srfi+dotschemers+dot+org">srfi-64 @<span class="antispam">nospam</span>srfi.schemers.org</a></code>. To subscribe to the list, follow <a href="https://srfi.schemers.org/srfi-list-subscribe.html">these instructions</a>. You can access previous messages via the mailing list <a href="https://srfi-email.schemers.org/srfi-64 ">archive</a>.</p>
3124
<ul>
@@ -39,7 +32,7 @@ <H1>Status</H1>
3932
</p>
4033

4134

42-
<H1>Abstract</H1>
35+
<h2>Abstract</h2>
4336
<p>
4437
This defines an API for writing <dfn>test suites</dfn>, to make it easy
4538
to portably test Scheme APIs, libraries, applications, and implementations.
@@ -48,7 +41,7 @@ <H1>Abstract</H1>
4841
also supports writing new test-runners, to allow customization
4942
of reporting and processing the result of running test suites.</p>
5043

51-
<h1>Rationale</h1>
44+
<h2>Rationale</h2>
5245

5346
<p>The Scheme community needs a standard for writing test suites.
5447
Every SRFI or other library should come with a test suite.
@@ -87,14 +80,14 @@ <h1>Rationale</h1>
8780
syntax is to allow specific tests to be skipped without evaluating sub-expressions, or for implementations
8881
to add features such as printing line numbers or catching exceptions.</p>
8982

90-
<h1>Specification</h1>
83+
<h2>Specification</h2>
9184

9285
<p>While this is a moderately complex specification,
9386
you should be able to write simple test suites after just reading the
9487
first few sections below. More advanced functionality, such
9588
as writing a custom test-runner, is at the end of the specification.</p>
9689

97-
<h2>Writing basic test suites</h2>
90+
<h3>Writing basic test suites</h3>
9891
<p>Let's start with a simple example.
9992
This is a complete self-contained test-suite.</p>
10093

@@ -129,7 +122,7 @@ <h2>Writing basic test suites</h2>
129122
and <code>test-end</code> will cause a summary to be displayed
130123
in an implementation-specified manner.</p>
131124

132-
<h3>Simple test-cases</h3>
125+
<h4>Simple test-cases</h4>
133126
<p>
134127
Primitive test cases test that a given condition is true.
135128
They may have a name.
@@ -188,7 +181,7 @@ <h3>Simple test-cases</h3>
188181
(&lt;= test-expr (+ expected error))))
189182
</pre>
190183

191-
<h3>Tests for catching errors</h3>
184+
<h4>Tests for catching errors</h4>
192185
<p>
193186
We need a way to specify that evaluation <em>should</em> fail.
194187
This verifies that errors are detected when required.</p>
@@ -225,7 +218,7 @@ <h3>Tests for catching errors</h3>
225218
An implementation that cannot catch exceptions should skip
226219
<code>test-error</code> forms.</p>
227220

228-
<h3>Testing syntax</h3>
221+
<h4>Testing syntax</h4>
229222
<p>
230223
Testing syntax is tricky, especially if we want to
231224
check that invalid syntax is causes an error.
@@ -260,7 +253,7 @@ <h3>Testing syntax</h3>
260253
(test-equal '(x z) (test-read-string "(list 'x #;'y 'z)"))
261254
</pre>
262255

263-
<h3>Test groups and paths</h3>
256+
<h4>Test groups and paths</h4>
264257
<p>A <dfn>test group</dfn> is a named sequence of forms containing testcases,
265258
expressions, and definitions.
266259
Entering a group sets the <dfn>test group name</dfn>; leaving a
@@ -329,7 +322,7 @@ <h3>Test groups and paths</h3>
329322
if it matched an active <code>test-skip</code> (see later).
330323
Also, the <code>test-end</code> is executed in case of an exception.</p>
331324

332-
<h3>Handling set-up and cleanup</h3>
325+
<h4>Handling set-up and cleanup</h4>
333326
<pre>
334327
(<b>test-group-with-cleanup</b> <var>suite-name</var>
335328
<var>decl-or-expr</var> ...
@@ -352,7 +345,7 @@ <h3>Handling set-up and cleanup</h3>
352345
<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.
353346

354347
<!--
355-
<h2>Test suites</h2>
348+
<h3>Test suites</h3>
356349
<p>
357350
<i>(Not sure how useful this is, given <code>test-group</code>).</i>
358351
<p>A <dfn>test suite</dfn> is a test group that can (and must) be
@@ -374,12 +367,12 @@ <h2>Test suites</h2>
374367
</pre>
375368
-->
376369

377-
<h2>Conditonal test-suites and other advanced features</h2>
370+
<h3>Conditonal test-suites and other advanced features</h3>
378371
<p>
379372
The following describes features for controlling which tests to execute,
380373
or specifing that some tests are <em>expected</em> to fail.</p>
381374

382-
<h3>Test specifiers</h3>
375+
<h4>Test specifiers</h4>
383376
<p>Sometimes we want to only run certain tests, or we know that
384377
certain tests are expected to fail.
385378
A <dfn>test specifier</dfn> is one-argument function that takes a test-runner
@@ -428,7 +421,7 @@ <h3>Test specifiers</h3>
428421
<code><var>name</var> </code><i>(i.e. a string)</i><br />
429422
Convenience short-hand for <code>(test-match-name <var>name</var>)</code>.</p>
430423

431-
<h3>Skipping selected tests</h3>
424+
<h4>Skipping selected tests</h4>
432425
<p>In some cases you may want to skip a test.</p>
433426
<pre>
434427
(<b>test-skip</b> <var>specifier</var>)
@@ -459,7 +452,7 @@ <h3>Skipping selected tests</h3>
459452
(test-assert "test-a") ;; executed
460453
</pre>
461454

462-
<h3>Expected failures</h3>
455+
<h4>Expected failures</h4>
463456
<p>
464457
Sometimes you know a test case will fail, but you don't have time
465458
to or can't fix it. Maybe a certain feature only works on certain platforms.
@@ -480,7 +473,7 @@ <h3>Expected failures</h3>
480473
(test-eqv ...) ;; expected to pass
481474
</pre>
482475

483-
<h2>Test-runner</h2>
476+
<h3>Test-runner</h3>
484477
<p>
485478
A <dfn>test-runner</dfn> is an object that runs a test-suite,
486479
and manages the state. The test group path, and the sets skip and
@@ -528,7 +521,7 @@ <h2>Test-runner</h2>
528521
As with <code>test-runner-current</code>, this may be a parameter object,
529522
or use a per-thread, fluid, or global variable.</p>
530523

531-
<h3>Running specific tests with a specified runner</h3>
524+
<h4>Running specific tests with a specified runner</h4>
532525
<p>
533526
<code>(<b>test-apply</b> [<var>runner</var>] <var>specifier</var> ... <var>procedure</var>)</code><br />
534527
Calls <var>procedure</var> with no arguments using the specified
@@ -547,12 +540,12 @@ <h3>Running specific tests with a specified runner</h3>
547540
Executes each <var>decl-or-expr</var> in order in a context
548541
where the current test-runner is <var>runner</var>.</p>
549542

550-
<h2>Test results</h2>
543+
<h3>Test results</h3>
551544
<p>Running a test sets various status properties in the current test-runner.
552545
This can be examined by a custom test-runner,
553546
or (more rarely) in a test-suite.</p>
554547

555-
<h3>Result kind</h3>
548+
<h4>Result kind</h4>
556549
<p>Running a test may yield one of the following
557550
status symbols:</p>
558551
<dl>
@@ -577,7 +570,7 @@ <h3>Result kind</h3>
577570
This is a convenient shorthand that might be useful
578571
in a test suite to only run certain tests if the previous test passed.</p>
579572

580-
<h3>Test result properties</h3>
573+
<h4>Test result properties</h4>
581574
<p>
582575
A test runner also maintains a set of more detailed <q>result properties</q>
583576
associated with the current or most recent test. (I.e. the properties of the
@@ -615,7 +608,7 @@ <h3>Test result properties</h3>
615608
However, a <code>test-result-clear</code> does not modify the returned
616609
alist. Thus you can <q>archive</q> result objects from previous runs.</p>
617610

618-
<h3>Standard result properties</h3>
611+
<h4>Standard result properties</h4>
619612
<p>
620613
The set of available result properties is implementation-specific.
621614
However, it is suggested that the following might be provided:</p>
@@ -644,12 +637,12 @@ <h3>Standard result properties</h3>
644637
The actual error value is implementation-defined.</dd>
645638
</dl>
646639

647-
<h2>Writing a new test-runner</h2>
640+
<h3>Writing a new test-runner</h3>
648641
<p>This section specifies how to write a test-runner.
649642
It can be ignored if you just want to write test-cases.</p>
650643

651644

652-
<h3>Call-back functions</h3>
645+
<h4>Call-back functions</h4>
653646
<p>
654647
These call-back functions are <q>methods</q> (in the object-oriented sense)
655648
of a test-runner. A method <code>test-runner-on-<var>event</var></code>
@@ -736,7 +729,7 @@ <h3>Call-back functions</h3>
736729
<code>(<b>test-on-bad-end-name-simple</b> <var>runner</var> <var>begin-name</var> <var>end-name</var>)</code><br />
737730
You can call those if you want to write your own test-runner.</p>
738731

739-
<h3>Test-runner components</h3>
732+
<h4>Test-runner components</h4>
740733
<p>
741734
The following functions are for accessing the other components of a test-runner.
742735
They would normally only be used to write a new test-runner or
@@ -782,7 +775,7 @@ <h3>Test-runner components</h3>
782775
Resets the state of the <var>runner</var> to its initial state.
783776
</p>
784777

785-
<h3>Example</h3>
778+
<h4>Example</h4>
786779
<p>This is an example of a simple custom test-runner.
787780
Loading this program before running a test-suite will install
788781
it as the default test runner.</p>
@@ -809,7 +802,7 @@ <h3>Example</h3>
809802
(lambda () (my-simple-runner "/tmp/my-test.log")))
810803
</pre>
811804

812-
<h1>Implementation</h1>
805+
<h2>Implementation</h2>
813806
<p>
814807
The test implementation uses <code>cond-expand</code>
815808
(<a href="https://srfi.schemers.org/srfi-0/srfi-0.html">SRFI-0</a>)
@@ -820,20 +813,20 @@ <h1>Implementation</h1>
820813

821814
<p><a href="testing.scm">testing.scm</a></p>
822815

823-
<h2>Examples</h2>
816+
<h3>Examples</h3>
824817
<p>Here is <a href="srfi-25-test.scm"><code>srfi-25-test.scm</code></a>,
825818
based converted from Jussi Piitulainen's
826819
<a href="https://srfi.schemers.org/srfi-25/test.scm"><code>test.scm</code></a>
827820
for <a href="https://srfi.schemers.org/srfi-25/srfi-25.html">SRFI-25</a>.</p>
828821

829-
<h2>Test suite</h2>
822+
<h3>Test suite</h3>
830823
<p>
831824
Of course we need a test suite for the testing framework itself.
832825
This suite <code><a href="srfi-64-test.scm">srfi-64-test.scm</a></code>
833826
was contributed by Donovan Kolbly
834827
<a href="mailto:[email protected]"><code>&lt;[email protected]&gt;</code></a>.</p>
835828

836-
<h1>Copyright</h1>
829+
<h2>Copyright</h2>
837830
<p>
838831
Copyright (C) Per Bothner (2005, 2006)</p>
839832
<p>

0 commit comments

Comments
 (0)