##// END OF EJS Templates
test-casefolding.t: demonstrate a bug with HFS+ ignoring some codepoints
Augie Fackler -
r23595:035434b4 stable
parent child Browse files
Show More
@@ -1,198 +1,211 b''
1 1 #require icasefs
2 2
3 3 $ hg debugfs | grep 'case-sensitive:'
4 4 case-sensitive: no
5 5
6 6 test file addition with bad case
7 7
8 8 $ hg init repo1
9 9 $ cd repo1
10 10 $ echo a > a
11 11 $ hg add A
12 12 adding a
13 13 $ hg st
14 14 A a
15 15 $ hg ci -m adda
16 16 $ hg manifest
17 17 a
18 18 $ cd ..
19 19
20 20 test case collision on rename (issue750)
21 21
22 22 $ hg init repo2
23 23 $ cd repo2
24 24 $ echo a > a
25 25 $ hg --debug ci -Am adda
26 26 adding a
27 27 a
28 28 committed changeset 0:07f4944404050f47db2e5c5071e0e84e7a27bba9
29 29
30 30 Case-changing renames should work:
31 31
32 32 $ hg mv a A
33 33 $ hg mv A a
34 34 $ hg st
35 35
36 36 test changing case of path components
37 37
38 38 $ mkdir D
39 39 $ echo b > D/b
40 40 $ hg ci -Am addb D/b
41 41 $ hg mv D/b d/b
42 42 D/b: not overwriting - file exists
43 43 $ hg mv D/b d/c
44 44 $ hg st
45 45 A D/c
46 46 R D/b
47 47 $ mv D temp
48 48 $ mv temp d
49 49 $ hg st
50 50 A D/c
51 51 R D/b
52 52 $ hg revert -aq
53 53 $ rm d/c
54 54 $ echo c > D/c
55 55 $ hg add D/c
56 56 $ hg st
57 57 A D/c
58 58 $ hg ci -m addc D/c
59 59 $ hg mv d/b d/e
60 60 moving D/b to D/e (glob)
61 61 $ hg st
62 62 A D/e
63 63 R D/b
64 64 $ hg revert -aq
65 65 $ rm d/e
66 66 $ hg mv d/b D/B
67 67 moving D/b to D/B (glob)
68 68 $ hg st
69 69 A D/B
70 70 R D/b
71 71 $ cd ..
72 72
73 73 test case collision between revisions (issue912)
74 74
75 75 $ hg init repo3
76 76 $ cd repo3
77 77 $ echo a > a
78 78 $ hg ci -Am adda
79 79 adding a
80 80 $ hg rm a
81 81 $ hg ci -Am removea
82 82 $ echo A > A
83 83
84 84 on linux hfs keeps the old case stored, force it
85 85
86 86 $ mv a aa
87 87 $ mv aa A
88 88 $ hg ci -Am addA
89 89 adding A
90 90
91 91 used to fail under case insensitive fs
92 92
93 93 $ hg up -C 0
94 94 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
95 95 $ hg up -C
96 96 1 files updated, 0 files merged, 1 files removed, 0 files unresolved
97 97
98 98 no clobbering of untracked files with wrong casing
99 99
100 100 $ hg up -r null
101 101 0 files updated, 0 files merged, 1 files removed, 0 files unresolved
102 102 $ echo gold > a
103 103 $ hg up
104 104 A: untracked file differs
105 105 abort: untracked files in working directory differ from files in requested revision
106 106 [255]
107 107 $ cat a
108 108 gold
109 109 $ rm a
110 110
111 111 test that normal file in different case on target context is not
112 112 unlinked by largefiles extension.
113 113
114 114 $ cat >> .hg/hgrc <<EOF
115 115 > [extensions]
116 116 > largefiles=
117 117 > EOF
118 118 $ hg update -q -C 1
119 119 $ hg status -A
120 120 $ echo 'A as largefiles' > A
121 121 $ hg add --large A
122 122 $ hg commit -m '#3'
123 123 created new head
124 124 $ hg manifest -r 3
125 125 .hglf/A
126 126 $ hg manifest -r 0
127 127 a
128 128 $ hg update -q -C 0
129 129 $ hg status -A
130 130 C a
131 131 $ hg update -q -C 3
132 132 $ hg update -q 0
133 133
134 134 $ cd ..
135 135
136 136 issue 3342: file in nested directory causes unexpected abort
137 137
138 138 $ hg init issue3342
139 139 $ cd issue3342
140 140
141 141 $ mkdir -p a/B/c/D
142 142 $ echo e > a/B/c/D/e
143 143 $ hg add a/B/c/D/e
144 144
145 145 $ cd ..
146 146
147 147 issue 3340: mq does not handle case changes correctly
148 148
149 149 in addition to reported case, 'hg qrefresh' is also tested against
150 150 case changes.
151 151
152 152 $ echo "[extensions]" >> $HGRCPATH
153 153 $ echo "mq=" >> $HGRCPATH
154 154
155 155 $ hg init issue3340
156 156 $ cd issue3340
157 157
158 158 $ echo a > mIxEdCaSe
159 159 $ hg add mIxEdCaSe
160 160 $ hg commit -m '#0'
161 161 $ hg rename mIxEdCaSe tmp
162 162 $ hg rename tmp MiXeDcAsE
163 163 $ hg status -A
164 164 A MiXeDcAsE
165 165 mIxEdCaSe
166 166 R mIxEdCaSe
167 167 $ hg qnew changecase
168 168 $ hg status -A
169 169 C MiXeDcAsE
170 170
171 171 $ hg qpop -a
172 172 popping changecase
173 173 patch queue now empty
174 174 $ hg qnew refresh-casechange
175 175 $ hg status -A
176 176 C mIxEdCaSe
177 177 $ hg rename mIxEdCaSe tmp
178 178 $ hg rename tmp MiXeDcAsE
179 179 $ hg status -A
180 180 A MiXeDcAsE
181 181 mIxEdCaSe
182 182 R mIxEdCaSe
183 183 $ hg qrefresh
184 184 $ hg status -A
185 185 C MiXeDcAsE
186 186
187 187 $ hg qpop -a
188 188 popping refresh-casechange
189 189 patch queue now empty
190 190 $ hg qnew refresh-pattern
191 191 $ hg status
192 192 $ echo A > A
193 193 $ hg add
194 194 adding A
195 195 $ hg qrefresh a # issue 3271, qrefresh with file handled case wrong
196 196 $ hg status # empty status means the qrefresh worked
197 197
198 #if osx
199
200 We assume anyone running the tests on a case-insensitive volume on OS
201 X will be using HFS+. If that's not true, this test will fail.
202
203 Bug: some codepoints are to be ignored on HFS+:
204
205 $ rm A
206 >>> open(u'a\u200c'.encode('utf-8'), 'w').write('unicode is fun')
207 $ hg status
208 M A
209 ? a\xe2\x80\x8c (esc)
210 #endif
198 211 $ cd ..
General Comments 0
You need to be logged in to leave comments. Login now