minirst: use unicode string as intermediate form for replacement
# this change redones part of
521c8e0c93bf, backed out by
0ad0ebe67815
Some character encodings use ASCII characters other than
control/alphabet/digit as a part of multi-bytes characters, so direct
replacing with such characters on strings in local encoding causes
invalid byte sequences.
[mpm: test changed to simple doctest]
# this is hack to make sure no escape characters are inserted into the output
import os
if 'TERM' in os.environ:
del os.environ['TERM']
import doctest
import mercurial.util
doctest.testmod(mercurial.util)
import mercurial.changelog
doctest.testmod(mercurial.changelog)
import mercurial.dagparser
doctest.testmod(mercurial.dagparser, optionflags=doctest.NORMALIZE_WHITESPACE)
import mercurial.match
doctest.testmod(mercurial.match)
import mercurial.store
doctest.testmod(mercurial.store)
import mercurial.ui
doctest.testmod(mercurial.ui)
import mercurial.url
doctest.testmod(mercurial.url)
import mercurial.encoding
doctest.testmod(mercurial.encoding)
import mercurial.hgweb.hgwebdir_mod
doctest.testmod(mercurial.hgweb.hgwebdir_mod)
import hgext.convert.cvsps
doctest.testmod(hgext.convert.cvsps)
import mercurial.revset
doctest.testmod(mercurial.revset)
import mercurial.minirst
doctest.testmod(mercurial.minirst)