Mercurial > hg
comparison tests/test-encoding @ 3789:734b1d6ba3dc
Use python instead of shell printf with \x sequences for test-encoding.
Needed e.g. to be compatible with Solaris.
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Tue, 05 Dec 2006 11:23:37 +0100 |
parents | 4421cef5d3f0 |
children | 3674ca805a5b |
comparison
equal
deleted
inserted
replaced
3788:18c93649f563 | 3789:734b1d6ba3dc |
---|---|
5 | 5 |
6 # we need a repo with some legacy latin-1 changesets | 6 # we need a repo with some legacy latin-1 changesets |
7 hg unbundle $TESTDIR/legacy-encoding.hg | 7 hg unbundle $TESTDIR/legacy-encoding.hg |
8 hg co | 8 hg co |
9 | 9 |
10 printf "latin-1 e' encoded: \xe9" > latin-1 | 10 python << EOF |
11 printf "utf-8 e' encoded: \xc3\xa9" > utf-8 | 11 f = file('latin-1', 'w'); f.write("latin-1 e' encoded: \xe9"); f.close() |
12 printf "\xe9" > latin-1-tag | 12 f = file('utf-8', 'w'); f.write("utf-8 e' encoded: \xc3\xa9"); f.close() |
13 f = file('latin-1-tag', 'w'); f.write("\xe9"); f.close() | |
14 EOF | |
13 | 15 |
14 echo % should fail with encoding error | 16 echo % should fail with encoding error |
15 echo "plain old ascii" > a | 17 echo "plain old ascii" > a |
16 hg st | 18 hg st |
17 HGENCODING=ascii hg ci -l latin-1 -d "0 0" | 19 HGENCODING=ascii hg ci -l latin-1 -d "0 0" |