Mercurial > hg
view tests/heredoctest.py @ 15607:fab28a577a38 stable
test-svn-subrepo: fix reference output for svn 1.7
I modified check-code.py "$?" detection because I thought my use was legit, we
cannot test exit status of pipelines commands except for the last one without
this. So it now tolerates "[$?" which is unlikely to be added by mistake.
Tested on:
- OSX + svn 1.7.1
- Linux + svn 1.6.12
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Fri, 02 Dec 2011 16:50:48 +0100 |
parents | 474279be5add |
children | 5635a4017061 |
line wrap: on
line source
import doctest, tempfile, os, sys if __name__ == "__main__": if 'TERM' in os.environ: del os.environ['TERM'] fd, name = tempfile.mkstemp(suffix='hg-tst') try: os.write(fd, sys.stdin.read()) os.close(fd) failures, _ = doctest.testfile(name, module_relative=False) if failures: sys.exit(1) finally: os.remove(name)