Mercurial > hg
comparison tests/test-run-tests.t @ 15434:5635a4017061
run-tests: replace inline python handling with more native scheme
Normally changes in tests are reported like this in diffs:
$ cat foo
- a
+ b
Using -i mode lets us update tests when the new results are correct
and/or populate tests with their output.
But with the standard doctest framework, inline Python sections in
tests changes instead result in a big failure report that's unhelpful.
So here, we replace the doctest calls with a simple compile/eval loop.
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Mon, 07 Nov 2011 13:46:41 -0600 |
parents | f30c0a7b8346 |
children | f8955a7f82e6 |
comparison
equal
deleted
inserted
replaced
15433:4df3de1d44ce | 15434:5635a4017061 |
---|---|
14 > echo bar | 14 > echo bar |
15 > } | 15 > } |
16 $ foo | 16 $ foo |
17 bar | 17 bar |
18 | 18 |
19 Return codes before inline python: | |
20 | |
21 $ false | |
22 [1] | |
23 | |
19 Doctest commands: | 24 Doctest commands: |
20 | 25 |
21 >>> print 'foo' | 26 >>> print 'foo' |
22 foo | 27 foo |
23 $ echo interleaved | 28 $ echo interleaved |
26 ... print c | 31 ... print c |
27 x | 32 x |
28 y | 33 y |
29 z | 34 z |
30 >>> print | 35 >>> print |
31 <BLANKLINE> | 36 |
32 | 37 |
33 Regular expressions: | 38 Regular expressions: |
34 | 39 |
35 $ echo foobarbaz | 40 $ echo foobarbaz |
36 foobar.* (re) | 41 foobar.* (re) |