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