comparison tests/test-locate @ 4234:fe0c0a317c09

make the output of test-locate more readable
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
date Fri, 16 Mar 2007 22:48:21 -0300
parents 1c69c73d85d9
children eca3277c4220
comparison
equal deleted inserted replaced
4233:03a665f9f913 4234:fe0c0a317c09
1 #!/bin/sh 1 #!/bin/sh
2 # 2
3 hglocate()
4 {
5 echo "hg locate $@"
6 hg locate "$@"
7 ret=$?
8 echo
9 return $ret
10 }
11
3 mkdir t 12 mkdir t
4 cd t 13 cd t
5 hg init 14 hg init
6 echo 0 > a 15 echo 0 > a
7 echo 0 > b 16 echo 0 > b
8 echo 0 > t.h 17 echo 0 > t.h
9 mkdir t 18 mkdir t
10 echo 0 > t/x 19 echo 0 > t/x
11 hg ci -A -m m -d "1000000 0" 20 hg ci -A -m m -d "1000000 0"
12 touch nottracked 21 touch nottracked
13 hg locate a && echo locate succeeded || echo locate failed 22 hglocate a && echo locate succeeded || echo locate failed
14 hg locate NONEXISTENT && echo locate succeeded || echo locate failed 23 hglocate NONEXISTENT && echo locate succeeded || echo locate failed
15 hg locate 24 hglocate
16 hg rm a 25 hg rm a
17 hg ci -m m -d "1000000 0" 26 hg ci -m m -d "1000000 0"
18 hg locate a 27 hglocate a
19 hg locate NONEXISTENT 28 hglocate NONEXISTENT
20 hg locate 29 hglocate
21 hg locate -r 0 a 30 hglocate -r 0 a
22 hg locate -r 0 NONEXISTENT 31 hglocate -r 0 NONEXISTENT
23 hg locate -r 0 32 hglocate -r 0
24 echo % -I/-X with relative path should work 33 echo % -I/-X with relative path should work
25 cd t 34 cd t
26 hg locate 35 hglocate
27 hg locate -I ../t 36 hglocate -I ../t
28 # test issue294 37 # test issue294
29 cd .. 38 cd ..
30 rm -r t 39 rm -r t
31 hg locate t 40 hglocate t