##// END OF EJS Templates
Make quoting in test-encoding simpler
Matt Mackall -
r3783:4421cef5 default
parent child Browse files
Show More
@@ -7,22 +7,32 cd t
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
11 printf "utf-8 e' encoded: \xc3\xa9" > utf-8
12 printf "\xe9" > latin-1-tag
13
10 echo % should fail with encoding error
14 echo % should fail with encoding error
11 echo "plain old ascii" > a
15 echo "plain old ascii" > a
12 hg st
16 hg st
13 HGENCODING=ascii hg ci -m "`printf "ascii 0xe9: \xe9"`" -d "0 0"
17 HGENCODING=ascii hg ci -l latin-1 -d "0 0"
14
18
15 echo % these should work
19 echo % these should work
16 echo "latin-1" > a
20 echo "latin-1" > a
17 HGENCODING=latin-1 hg ci -m "`printf "latin-1 e' encoded: \xe9"`" -d "0 0"
21 HGENCODING=latin-1 hg ci -l latin-1 -d "0 0"
18 echo "utf-8" > a
22 echo "utf-8" > a
19 HGENCODING=utf-8 hg ci -m "`printf "utf-8 e': \xc3\xa9"`" -d "0 0"
23 HGENCODING=utf-8 hg ci -l utf-8 -d "0 0"
20
24
21 HGENCODING=latin-1 hg tag -d "0 0" "`printf "\xe9"`"
25 HGENCODING=latin-1 hg tag -d "0 0" `cat latin-1-tag`
22
26
27 echo % ascii
23 hg --encoding ascii log
28 hg --encoding ascii log
29 echo % latin-1
24 hg --encoding latin-1 log
30 hg --encoding latin-1 log
31 echo % utf-8
25 hg --encoding utf-8 log
32 hg --encoding utf-8 log
33 echo % ascii
26 HGENCODING=ascii hg tags
34 HGENCODING=ascii hg tags
35 echo % latin-1
27 HGENCODING=latin-1 hg tags
36 HGENCODING=latin-1 hg tags
37 echo % utf-8
28 HGENCODING=utf-8 hg tags
38 HGENCODING=utf-8 hg tags
@@ -6,22 +6,26 added 1 changesets with 1 changes to 1 f
6 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
6 1 files updated, 0 files merged, 0 files removed, 0 files unresolved
7 % should fail with encoding error
7 % should fail with encoding error
8 M a
8 M a
9 abort: decoding near 'cii 0xe9: �': 'ascii' codec can't decode byte 0xe9 in position 12: ordinal not in range(128)!
9 ? latin-1
10 ? latin-1-tag
11 ? utf-8
12 abort: decoding near ' encoded: �': 'ascii' codec can't decode byte 0xe9 in position 20: ordinal not in range(128)!
10
13
11 transaction abort!
14 transaction abort!
12 rollback completed
15 rollback completed
13 % these should work
16 % these should work
14 changeset: 3:d6b63b86e629
17 % ascii
18 changeset: 3:5edfc7acb541
15 tag: tip
19 tag: tip
16 user: test
20 user: test
17 date: Thu Jan 01 00:00:00 1970 +0000
21 date: Thu Jan 01 00:00:00 1970 +0000
18 summary: Added tag ? for changeset 20ea57f280ca
22 summary: Added tag ? for changeset 91878608adb3
19
23
20 changeset: 2:20ea57f280ca
24 changeset: 2:91878608adb3
21 tag: ?
25 tag: ?
22 user: test
26 user: test
23 date: Thu Jan 01 00:00:00 1970 +0000
27 date: Thu Jan 01 00:00:00 1970 +0000
24 summary: utf-8 e': ?
28 summary: utf-8 e' encoded: ?
25
29
26 changeset: 1:6355cacf842e
30 changeset: 1:6355cacf842e
27 user: test
31 user: test
@@ -33,17 +37,18 user: test
33 date: Thu Jan 01 00:00:00 1970 +0000
37 date: Thu Jan 01 00:00:00 1970 +0000
34 summary: latin-1 e': ?
38 summary: latin-1 e': ?
35
39
36 changeset: 3:d6b63b86e629
40 % latin-1
41 changeset: 3:5edfc7acb541
37 tag: tip
42 tag: tip
38 user: test
43 user: test
39 date: Thu Jan 01 00:00:00 1970 +0000
44 date: Thu Jan 01 00:00:00 1970 +0000
40 summary: Added tag � for changeset 20ea57f280ca
45 summary: Added tag � for changeset 91878608adb3
41
46
42 changeset: 2:20ea57f280ca
47 changeset: 2:91878608adb3
43 tag: �
48 tag: �
44 user: test
49 user: test
45 date: Thu Jan 01 00:00:00 1970 +0000
50 date: Thu Jan 01 00:00:00 1970 +0000
46 summary: utf-8 e': �
51 summary: utf-8 e' encoded: �
47
52
48 changeset: 1:6355cacf842e
53 changeset: 1:6355cacf842e
49 user: test
54 user: test
@@ -55,17 +60,18 user: test
55 date: Thu Jan 01 00:00:00 1970 +0000
60 date: Thu Jan 01 00:00:00 1970 +0000
56 summary: latin-1 e': �
61 summary: latin-1 e': �
57
62
58 changeset: 3:d6b63b86e629
63 % utf-8
64 changeset: 3:5edfc7acb541
59 tag: tip
65 tag: tip
60 user: test
66 user: test
61 date: Thu Jan 01 00:00:00 1970 +0000
67 date: Thu Jan 01 00:00:00 1970 +0000
62 summary: Added tag é for changeset 20ea57f280ca
68 summary: Added tag é for changeset 91878608adb3
63
69
64 changeset: 2:20ea57f280ca
70 changeset: 2:91878608adb3
65 tag: é
71 tag: é
66 user: test
72 user: test
67 date: Thu Jan 01 00:00:00 1970 +0000
73 date: Thu Jan 01 00:00:00 1970 +0000
68 summary: utf-8 e': é
74 summary: utf-8 e' encoded: é
69
75
70 changeset: 1:6355cacf842e
76 changeset: 1:6355cacf842e
71 user: test
77 user: test
@@ -77,9 +83,12 user: test
77 date: Thu Jan 01 00:00:00 1970 +0000
83 date: Thu Jan 01 00:00:00 1970 +0000
78 summary: latin-1 e': é
84 summary: latin-1 e': é
79
85
80 tip 3:d6b63b86e629
86 % ascii
81 ? 2:20ea57f280ca
87 tip 3:5edfc7acb541
82 tip 3:d6b63b86e629
88 ? 2:91878608adb3
83 � 2:20ea57f280ca
89 % latin-1
84 tip 3:d6b63b86e629
90 tip 3:5edfc7acb541
85 é 2:20ea57f280ca
91 2:91878608adb3
92 % utf-8
93 tip 3:5edfc7acb541
94 é 2:91878608adb3
General Comments 0
You need to be logged in to leave comments. Login now