Mercurial > hg > hg-fastimport
comparison tests/test-fastimport-nonascii @ 38:3048a2dcf68a
Test that fastimport dumps with non-ASCII characters import OK.
| author | Greg Ward <greg-hg@gerg.ca> |
|---|---|
| date | Fri, 08 May 2009 11:03:51 -0400 |
| parents | |
| children | 7ff36dc9f0b1 |
comparison
equal
deleted
inserted
replaced
| 37:513449a88de2 | 38:3048a2dcf68a |
|---|---|
| 1 #!/bin/sh | |
| 2 | |
| 3 # Test dumps with non-ASCII characters in various places. | |
| 4 # | |
| 5 # This file, including the fastimport dumps in it and the | |
| 6 # associated .out file, are all encoded in UTF-8. | |
| 7 | |
| 8 . $TESTDIR/fastimport-common | |
| 9 | |
| 10 echo "% import dump with non-ASCII committer" | |
| 11 cat > committer.dump <<__EOF__ | |
| 12 commit refs/heads/master | |
| 13 mark :1 | |
| 14 committer Jean-François <jf@example.com> 1007132290 +0000 | |
| 15 data 4 | |
| 16 foo | |
| 17 | |
| 18 __EOF__ | |
| 19 | |
| 20 hg init committer | |
| 21 cd committer | |
| 22 hg --traceback fastimport ../committer.dump | |
| 23 echo "% log with non-ASCII committer" | |
| 24 | |
| 25 # Overide HGENCODING (it is set to 'ascii' by run-tests.py) to ensure | |
| 26 # log is accurately printed. | |
| 27 HGENCODING=utf-8 hg log | |
| 28 cd .. | |
| 29 | |
| 30 echo "% import dump with non-ASCII author" | |
| 31 cat > author.dump <<__EOF__ | |
| 32 commit refs/heads/master | |
| 33 mark :1 | |
| 34 author Jürgen <juergen@example.org> 1250000000 +0400 | |
| 35 committer Dave <dave@example.org> 1250000030 +0400 | |
| 36 data 5 | |
| 37 blah | |
| 38 | |
| 39 __EOF__ | |
| 40 | |
| 41 hg init author | |
| 42 cd author | |
| 43 hg --traceback fastimport ../author.dump | |
| 44 echo "% log with non-ASCII author" | |
| 45 HGENCODING=utf-8 hg log | |
| 46 cd .. | |
| 47 | |
| 48 echo "% import dump with non-ASCII message" | |
| 49 cat > message.dump <<__EOF__ | |
| 50 commit refs/heads/master | |
| 51 mark :1 | |
| 52 committer Dave <dave@example.org> 1250000030 +0400 | |
| 53 data 60 | |
| 54 fix naïve implementation that Øle threw together for €5 | |
| 55 | |
| 56 M 644 inline foo.txt | |
| 57 data 6 | |
| 58 hello | |
| 59 | |
| 60 | |
| 61 __EOF__ | |
| 62 | |
| 63 hg init message | |
| 64 cd message | |
| 65 hg --traceback fastimport ../message.dump | |
| 66 echo "% log with non-ASCII message" | |
| 67 HGENCODING=utf-8 hg log | |
| 68 echo "% manifest" | |
| 69 hg manifest -r0 | |
| 70 echo "% contents of foo.txt" | |
| 71 hg cat -r0 foo.txt | |
| 72 cd .. |
