##// END OF EJS Templates
add some more tests to hg locate
Alexis S. L. Carvalho -
r4235:eca3277c default
parent child Browse files
Show More
@@ -17,6 +17,8 b' echo 0 > b'
17 echo 0 > t.h
17 echo 0 > t.h
18 mkdir t
18 mkdir t
19 echo 0 > t/x
19 echo 0 > t/x
20 echo 0 > t/b
21 echo 0 > t/e.h
20 hg ci -A -m m -d "1000000 0"
22 hg ci -A -m m -d "1000000 0"
21 touch nottracked
23 touch nottracked
22 hglocate a && echo locate succeeded || echo locate failed
24 hglocate a && echo locate succeeded || echo locate failed
@@ -38,3 +40,13 b' hglocate -I ../t'
38 cd ..
40 cd ..
39 rm -r t
41 rm -r t
40 hglocate t
42 hglocate t
43 mkdir otherdir
44 cd otherdir
45 hglocate b
46 hglocate '*.h'
47 hglocate path:t/x
48 hglocate 're:.*\.h'
49 hglocate -r 0 b
50 hglocate -r 0 '*.h'
51 hglocate -r 0 path:t/x
52 hglocate -r 0 're:.*\.h'
@@ -1,6 +1,8 b''
1 adding a
1 adding a
2 adding b
2 adding b
3 adding t.h
3 adding t.h
4 adding t/b
5 adding t/e.h
4 adding t/x
6 adding t/x
5 hg locate a
7 hg locate a
6 a
8 a
@@ -13,6 +15,8 b' hg locate'
13 a
15 a
14 b
16 b
15 t.h
17 t.h
18 t/b
19 t/e.h
16 t/x
20 t/x
17
21
18 hg locate a
22 hg locate a
@@ -22,6 +26,8 b' hg locate NONEXISTENT'
22 hg locate
26 hg locate
23 b
27 b
24 t.h
28 t.h
29 t/b
30 t/e.h
25 t/x
31 t/x
26
32
27 hg locate -r 0 a
33 hg locate -r 0 a
@@ -33,17 +39,55 b' hg locate -r 0'
33 a
39 a
34 b
40 b
35 t.h
41 t.h
42 t/b
43 t/e.h
36 t/x
44 t/x
37
45
38 % -I/-X with relative path should work
46 % -I/-X with relative path should work
39 hg locate
47 hg locate
40 b
48 b
41 t.h
49 t.h
50 t/b
51 t/e.h
42 t/x
52 t/x
43
53
44 hg locate -I ../t
54 hg locate -I ../t
55 t/b
56 t/e.h
45 t/x
57 t/x
46
58
47 hg locate t
59 hg locate t
60 t/b
61 t/e.h
48 t/x
62 t/x
49
63
64 hg locate b
65 ../b
66 ../t/b
67
68 hg locate *.h
69 ../t.h
70 ../t/e.h
71
72 hg locate path:t/x
73 ../t/x
74
75 hg locate re:.*\.h
76 ../t.h
77 ../t/e.h
78
79 hg locate -r 0 b
80 ../b
81 ../t/b
82
83 hg locate -r 0 *.h
84 ../t.h
85 ../t/e.h
86
87 hg locate -r 0 path:t/x
88 ../t/x
89
90 hg locate -r 0 re:.*\.h
91 ../t.h
92 ../t/e.h
93
General Comments 0
You need to be logged in to leave comments. Login now