test-encoding: make test output easier to follow

This commit is contained in:
Martin Geisler 2009-09-27 09:39:57 +02:00
parent 42c594dc7e
commit b4069f8766
2 changed files with 22 additions and 20 deletions

View File

@ -29,30 +29,31 @@ HGENCODING=latin-1 hg branch `cat latin-1-tag`
HGENCODING=latin-1 hg ci -d "1000000 0" -m 'latin1 branch' HGENCODING=latin-1 hg ci -d "1000000 0" -m 'latin1 branch'
rm .hg/branch rm .hg/branch
echo % ascii echo "% hg log (ascii)"
hg --encoding ascii log hg --encoding ascii log
echo % latin-1 echo "% hg log (latin-1)"
hg --encoding latin-1 log hg --encoding latin-1 log
echo % utf-8 echo "% hg log (utf-8)"
hg --encoding utf-8 log hg --encoding utf-8 log
echo % ascii echo "% hg tags (ascii)"
HGENCODING=ascii hg tags HGENCODING=ascii hg tags
echo % latin-1 echo "% hg tags (latin-1)"
HGENCODING=latin-1 hg tags HGENCODING=latin-1 hg tags
echo % utf-8 echo "% hg tags (utf-8)"
HGENCODING=utf-8 hg tags HGENCODING=utf-8 hg tags
echo % ascii echo "% hg branches (ascii)"
HGENCODING=ascii hg branches HGENCODING=ascii hg branches
echo % latin-1 echo "% hg branches (latin-1)"
HGENCODING=latin-1 hg branches HGENCODING=latin-1 hg branches
echo % utf-8 echo "% hg branches (utf-8)"
HGENCODING=utf-8 hg branches HGENCODING=utf-8 hg branches
echo '[ui]' >> .hg/hgrc echo '[ui]' >> .hg/hgrc
echo 'fallbackencoding = koi8-r' >> .hg/hgrc echo 'fallbackencoding = koi8-r' >> .hg/hgrc
echo % utf-8 echo "% hg log (utf-8)"
HGENCODING=utf-8 hg log HGENCODING=utf-8 hg log
echo "% hg log (dolphin)"
HGENCODING=dolphin hg log HGENCODING=dolphin hg log
HGENCODING=ascii hg branch `cat latin-1-tag` HGENCODING=ascii hg branch `cat latin-1-tag`

View File

@ -14,7 +14,7 @@ rollback completed
abort: decoding near ' encoded: é': 'ascii' codec can't decode byte 0xe9 in position 20: ordinal not in range(128)! abort: decoding near ' encoded: é': 'ascii' codec can't decode byte 0xe9 in position 20: ordinal not in range(128)!
% these should work % these should work
marked working directory as branch é marked working directory as branch é
% ascii % hg log (ascii)
changeset: 5:db5520b4645f changeset: 5:db5520b4645f
branch: ? branch: ?
tag: tip tag: tip
@ -48,7 +48,7 @@ user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Mon Jan 12 13:46:40 1970 +0000
summary: latin-1 e': ? = u'\xe9' summary: latin-1 e': ? = u'\xe9'
% latin-1 % hg log (latin-1)
changeset: 5:db5520b4645f changeset: 5:db5520b4645f
branch: é branch: é
tag: tip tag: tip
@ -82,7 +82,7 @@ user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Mon Jan 12 13:46:40 1970 +0000
summary: latin-1 e': é = u'\xe9' summary: latin-1 e': é = u'\xe9'
% utf-8 % hg log (utf-8)
changeset: 5:db5520b4645f changeset: 5:db5520b4645f
branch: é branch: é
tag: tip tag: tip
@ -116,25 +116,25 @@ user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Mon Jan 12 13:46:40 1970 +0000
summary: latin-1 e': é = u'\xe9' summary: latin-1 e': é = u'\xe9'
% ascii % hg tags (ascii)
tip 5:db5520b4645f tip 5:db5520b4645f
? 3:770b9b11621d ? 3:770b9b11621d
% latin-1 % hg tags (latin-1)
tip 5:db5520b4645f tip 5:db5520b4645f
é 3:770b9b11621d é 3:770b9b11621d
% utf-8 % hg tags (utf-8)
tip 5:db5520b4645f tip 5:db5520b4645f
é 3:770b9b11621d é 3:770b9b11621d
% ascii % hg branches (ascii)
? 5:db5520b4645f ? 5:db5520b4645f
default 4:9cff3c980b58 (inactive) default 4:9cff3c980b58 (inactive)
% latin-1 % hg branches (latin-1)
é 5:db5520b4645f é 5:db5520b4645f
default 4:9cff3c980b58 (inactive) default 4:9cff3c980b58 (inactive)
% utf-8 % hg branches (utf-8)
é 5:db5520b4645f é 5:db5520b4645f
default 4:9cff3c980b58 (inactive) default 4:9cff3c980b58 (inactive)
% utf-8 % hg log (utf-8)
changeset: 5:db5520b4645f changeset: 5:db5520b4645f
branch: é branch: é
tag: tip tag: tip
@ -168,6 +168,7 @@ user: test
date: Mon Jan 12 13:46:40 1970 +0000 date: Mon Jan 12 13:46:40 1970 +0000
summary: latin-1 e': И = u'\xe9' summary: latin-1 e': И = u'\xe9'
% hg log (dolphin)
abort: unknown encoding: dolphin, please check your locale settings abort: unknown encoding: dolphin, please check your locale settings
abort: decoding near 'é': 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)! abort: decoding near 'é': 'ascii' codec can't decode byte 0xe9 in position 0: ordinal not in range(128)!
abort: branch name not in UTF-8! abort: branch name not in UTF-8!