# HG changeset patch # User Alexis S. L. Carvalho # Date 2007-03-17 01:48:21 # Node ID fe0c0a317c097748740ba7bba9cbd70f48087aa5 # Parent 03a665f9f913b48fe8bfc9ae3edf8db786823c8b make the output of test-locate more readable diff --git a/tests/test-locate b/tests/test-locate --- a/tests/test-locate +++ b/tests/test-locate @@ -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 @@ mkdir t 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 --git a/tests/test-locate.out b/tests/test-locate.out --- a/tests/test-locate.out +++ b/tests/test-locate.out @@ -2,24 +2,48 @@ adding a 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 +