test-locate
56 lines
| 915 B
| text/plain
|
TextLexer
/ tests / test-locate
Benoit Boissinot
|
r1622 | #!/bin/sh | ||
Alexis S. L. Carvalho
|
r4234 | |||
hglocate() | ||||
{ | ||||
echo "hg locate $@" | ||||
hg locate "$@" | ||||
ret=$? | ||||
echo | ||||
return $ret | ||||
} | ||||
Benoit Boissinot
|
r1622 | mkdir t | ||
cd t | ||||
hg init | ||||
echo 0 > a | ||||
echo 0 > b | ||||
Brendan Cully
|
r2487 | echo 0 > t.h | ||
Vadim Gelfer
|
r2480 | mkdir t | ||
echo 0 > t/x | ||||
Alexis S. L. Carvalho
|
r4235 | echo 0 > t/b | ||
echo 0 > t/e.h | ||||
Alexis S. L. Carvalho
|
r4307 | mkdir dir.h | ||
echo 0 > dir.h/foo | ||||
Thomas Arendsen Hein
|
r1933 | hg ci -A -m m -d "1000000 0" | ||
Benoit Boissinot
|
r1622 | touch nottracked | ||
Alexis S. L. Carvalho
|
r4234 | hglocate a && echo locate succeeded || echo locate failed | ||
hglocate NONEXISTENT && echo locate succeeded || echo locate failed | ||||
hglocate | ||||
Benoit Boissinot
|
r1622 | hg rm a | ||
Thomas Arendsen Hein
|
r1933 | hg ci -m m -d "1000000 0" | ||
Alexis S. L. Carvalho
|
r4234 | hglocate a | ||
hglocate NONEXISTENT | ||||
Alexis S. L. Carvalho
|
r4308 | hglocate relpath:NONEXISTENT | ||
Alexis S. L. Carvalho
|
r4234 | hglocate | ||
hglocate -r 0 a | ||||
hglocate -r 0 NONEXISTENT | ||||
Alexis S. L. Carvalho
|
r4308 | hglocate -r 0 relpath:NONEXISTENT | ||
Alexis S. L. Carvalho
|
r4234 | hglocate -r 0 | ||
Vadim Gelfer
|
r2480 | echo % -I/-X with relative path should work | ||
cd t | ||||
Alexis S. L. Carvalho
|
r4234 | hglocate | ||
hglocate -I ../t | ||||
Brendan Cully
|
r2487 | # test issue294 | ||
cd .. | ||||
Thomas Arendsen Hein
|
r3988 | rm -r t | ||
Alexis S. L. Carvalho
|
r4307 | hglocate 't/**' | ||
Alexis S. L. Carvalho
|
r4235 | mkdir otherdir | ||
cd otherdir | ||||
hglocate b | ||||
hglocate '*.h' | ||||
hglocate path:t/x | ||||
Alexis S. L. Carvalho
|
r4307 | hglocate 're:.*\.h$' | ||
Alexis S. L. Carvalho
|
r4235 | hglocate -r 0 b | ||
hglocate -r 0 '*.h' | ||||
hglocate -r 0 path:t/x | ||||
Alexis S. L. Carvalho
|
r4307 | hglocate -r 0 're:.*\.h$' | ||