diff -r 6ca49c5fe268 -r c8686e3f0291 tests/test-ssh-clone-r --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/tests/test-ssh-clone-r Wed Oct 18 02:14:26 2006 -0500 @@ -0,0 +1,99 @@ +#!/bin/sh + +# This test tries to exercise the ssh functionality with a dummy script + +cat <<'EOF' > dummyssh +#!/bin/sh +# this attempts to deal with relative pathnames +cd `dirname $0` + +# check for proper args +if [ $1 != "user@dummy" ] ; then + exit -1 +fi + +# check that we're in the right directory +if [ ! -x dummyssh ] ; then + exit -1 +fi + +SSH_CLIENT='127.0.0.1 1 2' +export SSH_CLIENT +echo Got arguments 1:$1 2:$2 3:$3 4:$4 5:$5 >> dummylog +$2 +EOF +chmod +x dummyssh + +hg init remote +cd remote +echo "# creating 'remote'" +cat >>afile <>afile <>afile <>afile <>afile <>afile <fred <>afile <&1 + if cd test-"$i"; then + hg verify + cd .. + fi +done +cd test-8 +hg pull ../test-7 +hg verify +cd .. +cd test-1 +hg pull -e ../dummyssh -r 4 ssh://user@dummy/remote 2>&1 +hg verify +hg pull -e ../dummyssh ssh://user@dummy/remote 2>&1 +cd .. +cd test-2 +hg pull -e ../dummyssh -r 5 ssh://user@dummy/remote 2>&1 +hg verify +hg pull -e ../dummyssh ssh://user@dummy/remote 2>&1 +hg verify +cd ..