Mercurial > hg
comparison tests/test-convert @ 8674:0941ee76489e
run-tests: redefine --with-hg so it takes the 'hg' script to run.
- in parseargs(), check that --with-hg value is valid
- add handy --local option for "--with-hg=../hg"
- ensure that we always set PATH and PYTHONPATH (not just
when doing a temporary install)
- override any existing PYTHONPATH, so test success does not
depend on whatever happens to be in the caller's environment
- give tests a little more control by exporting $PYTHON to the
environment; needed by test-convert and test-mergetool when
they run hg with a stripped-down $PATH
Also, add a big comment explaining all the corner cases to test for the
next person who tries to modify this script.
author | Greg Ward <greg-hg@gerg.ca> |
---|---|
date | Sun, 31 May 2009 15:20:31 -0400 |
parents | d596b1f2935a |
children | a7178eccf2dc |
comparison
equal
deleted
inserted
replaced
8673:a8066f2fd1aa | 8674:0941ee76489e |
---|---|
45 hg convert --debug --filemap filemap a partialb | \ | 45 hg convert --debug --filemap filemap a partialb | \ |
46 grep 'run hg' | 46 grep 'run hg' |
47 | 47 |
48 echo % converting empty dir should fail "nicely" | 48 echo % converting empty dir should fail "nicely" |
49 mkdir emptydir | 49 mkdir emptydir |
50 PATH=$BINDIR hg convert emptydir 2>&1 | sed 's,file://.*/emptydir,.../emptydir,g' | 50 # override $PATH to ensure p4 not visible; use $PYTHON in case we're |
51 # running from a devel copy, not a temp installation | |
52 PATH=$BINDIR $PYTHON $BINDIR/hg convert emptydir 2>&1 | sed 's,file://.*/emptydir,.../emptydir,g' |