tests/heredoctest.py
branchstable
changeset 1107 943253aadddb
child 1108 168da136346a
equal deleted inserted replaced
1106:a02b1025536c 1107:943253aadddb
       
     1 import doctest, tempfile, os, sys
       
     2 
       
     3 if __name__ == "__main__":
       
     4     fd, name = tempfile.mkstemp(suffix='hg-tst')
       
     5     os.write(fd, sys.stdin.read())
       
     6     os.close(fd)
       
     7     failures, _ = doctest.testfile(name, module_relative=False)
       
     8     if failures:
       
     9         sys.exit(1)