annotate tests/test-doctest.py @ 7120:db7557359636

highlight: convert text to local before passing to pygmentize (issue1341) Example case: Display file written in iso-8859-1 with current HGENCODING utf-8. At the moment only an Error page appears because pygmentize chokes on the replacement chars. Alternatives: 1) Turn off highlighting and avoid UnicodeDecodeError for files that are not in HGENCODING. 2) [this patch] use util.tolocal to display these files. Alternative 2) seems ok, as this only concerns display and readability. See also: fe38b0a3a928, apparently put aside during refactor of highlight. Add test for UnicodeDecodeError with iso-8859-1 file contents.
author Christian Ebert <blacktrash@gmx.net>
date Fri, 17 Oct 2008 12:12:33 +0200
parents d4218edd55bd
children 67ba74938b15
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
7041
b856071435f7 tests: fix readline escape characters in output for test-doctest.py
Mads Kiilerich <mads@kiilerich.com>
parents: 5525
diff changeset
1 # this is hack to make sure no escape characters are inserted into the output
7078
967adcf5910d test-doctest: remove TERM env variable only if it's there
Patrick Mezard <pmezard@gmail.com>
parents: 7041
diff changeset
2 import os;
967adcf5910d test-doctest: remove TERM env variable only if it's there
Patrick Mezard <pmezard@gmail.com>
parents: 7041
diff changeset
3 if 'TERM' in os.environ:
967adcf5910d test-doctest: remove TERM env variable only if it's there
Patrick Mezard <pmezard@gmail.com>
parents: 7041
diff changeset
4 del os.environ['TERM']
3232
394ac87f3b74 [extendedchangelog] encode/decode function
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
5 import doctest
394ac87f3b74 [extendedchangelog] encode/decode function
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
6
394ac87f3b74 [extendedchangelog] encode/decode function
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
7 import mercurial.changelog
394ac87f3b74 [extendedchangelog] encode/decode function
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
8 # test doctest from changelog
394ac87f3b74 [extendedchangelog] encode/decode function
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
9
394ac87f3b74 [extendedchangelog] encode/decode function
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
10 doctest.testmod(mercurial.changelog)
394ac87f3b74 [extendedchangelog] encode/decode function
Benoit Boissinot <benoit.boissinot@ens-lyon.org>
parents:
diff changeset
11
5066
167c422c745f httprepo: quote the path part of the URL
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4122
diff changeset
12 import mercurial.httprepo
167c422c745f httprepo: quote the path part of the URL
Alexis S. L. Carvalho <alexis@cecm.usp.br>
parents: 4122
diff changeset
13 doctest.testmod(mercurial.httprepo)
5525
dcbda0c4c3eb Do not display passwords with pull/push/incoming/outgoing
Manuel Holtgrewe <purestorm@ggnore.net>
parents: 5066
diff changeset
14
dcbda0c4c3eb Do not display passwords with pull/push/incoming/outgoing
Manuel Holtgrewe <purestorm@ggnore.net>
parents: 5066
diff changeset
15 import mercurial.util
dcbda0c4c3eb Do not display passwords with pull/push/incoming/outgoing
Manuel Holtgrewe <purestorm@ggnore.net>
parents: 5066
diff changeset
16 doctest.testmod(mercurial.util)
7097
d4218edd55bd convert: fix builtin cvsps under Windows
Patrick Mezard <pmezard@gmail.com>
parents: 7078
diff changeset
17
d4218edd55bd convert: fix builtin cvsps under Windows
Patrick Mezard <pmezard@gmail.com>
parents: 7078
diff changeset
18 import hgext.convert.cvsps
d4218edd55bd convert: fix builtin cvsps under Windows
Patrick Mezard <pmezard@gmail.com>
parents: 7078
diff changeset
19 doctest.testmod(hgext.convert.cvsps)