tests/test-walk
author Alexis S. L. Carvalho <alexis@cecm.usp.br>
Sat, 10 Mar 2007 23:00:49 -0300
changeset 4189 b1716a1f79c4
parent 4188 ce3ecf99a18b
child 4190 769bc4af561d
permissions -rwxr-xr-x
util._matcher: fix handling of path: patterns

#!/bin/sh

mkdir t
cd t
hg init
mkdir -p beans
for b in kidney navy turtle borlotti black pinto; do
    echo $b > beans/$b
done
mkdir -p mammals/Procyonidae
for m in cacomistle coatimundi raccoon; do
    echo $m > mammals/Procyonidae/$m
done
echo skunk > mammals/skunk
echo fennel > fennel
echo fenugreek > fenugreek
echo fiddlehead > fiddlehead
echo glob:glob > glob:glob
hg addremove
hg commit -m "commit #0" -d "1000000 0"
hg debugwalk
cd mammals
hg debugwalk .
hg debugwalk Procyonidae
cd Procyonidae
hg debugwalk .
hg debugwalk ..
cd ..
hg debugwalk ../beans
hg debugwalk .
hg debugwalk .hg
hg debugwalk ../.hg
cd ..
hg debugwalk -Ibeans
hg debugwalk 'glob:mammals/../beans/b*'
hg debugwalk '-X*/Procyonidae' mammals
hg debugwalk path:mammals
hg debugwalk ..
hg debugwalk beans/../..
hg debugwalk .hg
hg debugwalk beans/../.hg
hg debugwalk beans/../.hg/data
hg debugwalk beans/.hg
# Don't know how to test absolute paths without always getting a false
# error.
#hg debugwalk `pwd`/beans
#hg debugwalk `pwd`/..
hg debugwalk glob:\*
hg debugwalk 're:.*[kb]$'
hg debugwalk path:beans/black
hg debugwalk path:beans//black
hg debugwalk relglob:Procyonidae
hg debugwalk relglob:Procyonidae/ fennel
hg debugwalk beans 'glob:beans/*'
hg debugwalk 'glob:mamm**'
hg debugwalk 'glob:mamm**' fennel
hg debugwalk 'glob:j*'
hg debugwalk NOEXIST
mkfifo fifo
hg debugwalk fifo
rm fenugreek
hg debugwalk fenugreek
hg rm fenugreek
hg debugwalk fenugreek
touch new
hg debugwalk new