# HG changeset patch # User Alexis S. L. Carvalho # Date 1174096101 10800 # Node ID fe0c0a317c097748740ba7bba9cbd70f48087aa5 # Parent 03a665f9f913b48fe8bfc9ae3edf8db786823c8b make the output of test-locate more readable diff -r 03a665f9f913 -r fe0c0a317c09 tests/test-locate --- a/tests/test-locate Fri Mar 16 22:48:20 2007 -0300 +++ b/tests/test-locate Fri Mar 16 22:48:21 2007 -0300 @@ -1,5 +1,14 @@ #!/bin/sh -# + +hglocate() +{ + echo "hg locate $@" + hg locate "$@" + ret=$? + echo + return $ret +} + mkdir t cd t hg init @@ -10,22 +19,22 @@ echo 0 > t/x hg ci -A -m m -d "1000000 0" touch nottracked -hg locate a && echo locate succeeded || echo locate failed -hg locate NONEXISTENT && echo locate succeeded || echo locate failed -hg locate +hglocate a && echo locate succeeded || echo locate failed +hglocate NONEXISTENT && echo locate succeeded || echo locate failed +hglocate hg rm a hg ci -m m -d "1000000 0" -hg locate a -hg locate NONEXISTENT -hg locate -hg locate -r 0 a -hg locate -r 0 NONEXISTENT -hg locate -r 0 +hglocate a +hglocate NONEXISTENT +hglocate +hglocate -r 0 a +hglocate -r 0 NONEXISTENT +hglocate -r 0 echo % -I/-X with relative path should work cd t -hg locate -hg locate -I ../t +hglocate +hglocate -I ../t # test issue294 cd .. rm -r t -hg locate t +hglocate t diff -r 03a665f9f913 -r fe0c0a317c09 tests/test-locate.out --- a/tests/test-locate.out Fri Mar 16 22:48:20 2007 -0300 +++ b/tests/test-locate.out Fri Mar 16 22:48:21 2007 -0300 @@ -2,24 +2,48 @@ adding b adding t.h adding t/x +hg locate a a + locate succeeded +hg locate NONEXISTENT + locate failed +hg locate a b t.h t/x + +hg locate a + +hg locate NONEXISTENT + +hg locate b t.h t/x + +hg locate -r 0 a a + +hg locate -r 0 NONEXISTENT + +hg locate -r 0 a b t.h t/x + % -I/-X with relative path should work +hg locate b t.h t/x + +hg locate -I ../t t/x + +hg locate t t/x +