Mercurial > hg
comparison tests/test-status.t @ 12365:22f3353bcc36
tests: cleanup exit code handling in unified tests
author | Matt Mackall <mpm@selenic.com> |
---|---|
date | Tue, 21 Sep 2010 16:00:02 -0500 |
parents | b63f6422d2a7 |
children | 3a3584967a93 |
comparison
equal
deleted
inserted
replaced
12364:e128fa4615f2 | 12365:22f3353bcc36 |
---|---|
194 Run status with 2 different flags. | 194 Run status with 2 different flags. |
195 Check if result is the same or different. | 195 Check if result is the same or different. |
196 If result is not as expected, raise error | 196 If result is not as expected, raise error |
197 | 197 |
198 $ assert() { | 198 $ assert() { |
199 > hg status $1 > ../a | 199 > hg status $1 > ../a |
200 > hg status $2 > ../b | 200 > hg status $2 > ../b |
201 > out=`diff ../a ../b` | 201 > if diff ../a ../b > /dev/null; then |
202 > if [ $? -ne 0 ]; then | 202 > out=0 |
203 > else | |
203 > out=1 | 204 > out=1 |
204 > else | |
205 > out=0 | |
206 > fi | 205 > fi |
207 > if [ $3 -eq 0 ]; then | 206 > if [ $3 -eq 0 ]; then |
208 > df="same" | 207 > df="same" |
209 > else | 208 > else |
210 > df="different" | 209 > df="different" |