sapling/tests/test-bad-pull.t

28 lines
747 B
Perl
Raw Normal View History

$ "$TESTDIR/hghave" serve || exit 80
2010-08-14 04:39:39 +04:00
$ hg clone http://localhost:$HGPORT/ copy
abort: error: Connection refused
2010-09-17 02:51:32 +04:00
[255]
2010-08-14 04:39:39 +04:00
$ test -d copy
[1]
2010-08-14 04:39:39 +04:00
$ cat > dumb.py <<EOF
> import BaseHTTPServer, SimpleHTTPServer, os, signal
> def run(server_class=BaseHTTPServer.HTTPServer,
> handler_class=SimpleHTTPServer.SimpleHTTPRequestHandler):
> server_address = ('localhost', int(os.environ['HGPORT']))
> httpd = server_class(server_address, handler_class)
> open("listening", "w")
> httpd.handle_request()
2010-08-14 04:39:39 +04:00
> run()
> EOF
$ python dumb.py 2> log &
$ P=$!
$ while [ ! -f listening ]; do sleep 0; done
$ hg clone http://localhost:$HGPORT/foo copy2
abort: HTTP Error 404: * (glob)
[255]
$ wait $P