tests/test-walk
author Thomas Arendsen Hein <thomas@intevation.de>
Mon, 13 Mar 2006 13:05:41 +0100
changeset 1933 7544700fd931
parent 1568 1d7d0c07e8f3
child 1976 df8416346bb7
permissions -rwxr-xr-x
Use 'hg ci -d "1000000 0"' in tests to circumvent problem with leading zero. Some systems show "Thu Jan 01" instead of "Thu Jan 1", which breaks tests. Using "1000000" yields "Mon Jan 12 13:46:40 1970", which looks the same on all systems.

#!/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 .
cd ..
hg debugwalk -Ibeans
hg debugwalk 'glob:mammals/../beans/b*'
hg debugwalk '-X*/Procyonidae' mammals
hg debugwalk path:mammals
hg debugwalk ..
hg debugwalk beans/../..
# 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 beans 'glob:beans/*'
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