comparison tests/test-mq @ 4101:e2ed92f4c0f7

add some tests for qpush/qpop error codes
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Sat, 17 Feb 2007 04:50:06 -0200
parents 49237d6ae97d
children ba51a8225a60
comparison
equal deleted inserted replaced
4100:c30c922f907a 4101:e2ed92f4c0f7
166 hg qpush test1b.patch+1 166 hg qpush test1b.patch+1
167 167
168 echo % push should succeed 168 echo % push should succeed
169 hg qpop -a 169 hg qpop -a
170 hg push ../../k 170 hg push ../../k
171
172 echo % qpush/qpop error codes
173 errorcode()
174 {
175 hg "$@" && echo " $@ succeeds" || echo " $@ fails"
176 }
177
178 # we want to start with some patches applied
179 hg qpush -a
180 echo " % pops all patches and succeeds"
181 errorcode qpop -a
182 echo " % does nothing and succeeds"
183 errorcode qpop -a
184 echo " % fails - nothing else to pop"
185 errorcode qpop
186 echo " % pushes a patch and succeeds"
187 errorcode qpush
188 echo " % pops a patch and succeeds"
189 errorcode qpop
190 echo " % pushes up to test1b.patch and succeeds"
191 errorcode qpush test1b.patch
192 echo " % does nothing and succeeds"
193 errorcode qpush test1b.patch
194 echo " % does nothing and succeeds"
195 errorcode qpop test1b.patch
196 echo " % fails - can't push to this patch"
197 errorcode qpush test.patch
198 echo " % fails - can't pop to this patch"
199 errorcode qpop test2.patch
200 echo " % pops up to test.patch and succeeds"
201 errorcode qpop test.patch
202 echo " % pushes all patches and succeeds"
203 errorcode qpush -a
204 echo " % does nothing and succeeds"
205 errorcode qpush -a
206 echo " % fails - nothing else to push"
207 errorcode qpush
208 echo " % does nothing and succeeds"
209 errorcode qpush test2.patch
210
171 211
172 echo % strip 212 echo % strip
173 cd ../../b 213 cd ../../b
174 echo x>x 214 echo x>x
175 hg ci -Ama 215 hg ci -Ama