JuliaLang/julia — pull request #4897 by nolta (2013-11-22 23:01:30+00:00)
Title: close #52 (run doc example code as a test suite)

I've modified [sphinx's doc testing extension](http://sphinx-doc.org/ext/doctest.html) to work with julia.

```
$ cat doc/manual/complex-and-rational-numbers.rst
...

.. doctest::

julia> 1 + 2//3im
1//1 + 2//3im

...
$ make -C doc doctest
...
**********************************************************************
File "manual/complex-and-rational-numbers.rst", line 326, in default
Failed example:
1 + 2//3im
Expected:
1//1 + 2//3im
Got:
1//1 - 2//3im
**********************************************************************
...
```

Output is also saved to `_build/doctest/output.txt`.

Almost all the errors found so far are trivial formatting or wording changes, but here are the the less trivial ones:

* https://github.com/JuliaLang/julia/commit/b995da566412b3a8f56fce282f4324e42c425577#diff-13afb6acee031f3512ddc8e67a82d94eL515
* https://github.com/JuliaLang/julia/commit/b995da566412b3a8f56fce282f4324e42c425577#diff-7e34a64cb7b5cc70c65971108b1e4969L323
* https://github.com/JuliaLang/julia/commit/b995da566412b3a8f56fce282f4324e42c425577#diff-13afb6acee031f3512ddc8e67a82d94eL515
* https://github.com/JuliaLang/julia/commit/b995da566412b3a8f56fce282f4324e42c425577#diff-076252d2677e65b4c3032a7c77e2c0eeL225