summaryrefslogtreecommitdiff
path: root/README
blob: f1a9f84e8053a929a141c0caebc689a226bf1aef (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
README for wikitexttest
=============================================================================

wikitexttest is a RUDIMENTARY test suite for implementations of
"wikitext", the markup language understood by MediaWiki, the wiki
engine used by Wikipedia and other sites.

This is an unofficial side project. Wikitext does not have an official
specification, but there are several implementations and it is the
hope that this test suite might eventually maybe possibly perhaps be
the first step towards a minimal information specification for it that
all interested applications can agree on.



Architecture
-----------------------------------------------------------------------------

The architecture of the test suite is as follows: each test consists
of an input file in wikitext, and the expected output as HTML. The
test suite is provided with a wikitext implementation with a Unix
command line program. The test suite feeds each input file to the
program via stdin, and compares the stdout against the expected HTML.
The comparison is done against normalised parse trees, not textually,
to ignore irrlevant differences such amount of white space.

For example, the input file might be:

```
hello '''world'''
```

The expected HTML output would be:

```html
<p>hello <b>world</b></p>
```

He wikitext implementation might instead output the following, and it
would still be acceptable:


```html
<P>hello
 <B>world</B>
</P>
```