# HG changeset patch # User Michele Cella # Date 2008-01-22 22:06:37 # Node ID 6d5ecf824a65e9fadf524cb0b464b36e3477d81b # Parent f25070ecf334853857dde11c9e9e77e4165020b2 tests for hg serve prefix option diff --git a/tests/test-serve b/tests/test-serve --- a/tests/test-serve +++ b/tests/test-serve @@ -16,3 +16,27 @@ fi echo % With -v hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -v | sed -e 's,:[0-9][0-9]*/,/,' cat hg.pid >> "$DAEMON_PIDS" +kill `cat hg.pid` +sleep 1 + +echo % With --prefix foo +hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -v --prefix foo | sed -e 's,:[0-9][0-9]*/,/,' +cat hg.pid >> "$DAEMON_PIDS" +kill `cat hg.pid` +sleep 1 + +echo % With --prefix /foo +hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -v --prefix /foo | sed -e 's,:[0-9][0-9]*/,/,' +cat hg.pid >> "$DAEMON_PIDS" +kill `cat hg.pid` +sleep 1 + +echo % With --prefix foo/ +hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -v --prefix foo/ | sed -e 's,:[0-9][0-9]*/,/,' +cat hg.pid >> "$DAEMON_PIDS" +kill `cat hg.pid` +sleep 1 + +echo % With --prefix /foo/ +hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -v --prefix /foo/ | sed -e 's,:[0-9][0-9]*/,/,' +cat hg.pid >> "$DAEMON_PIDS" diff --git a/tests/test-serve.out b/tests/test-serve.out --- a/tests/test-serve.out +++ b/tests/test-serve.out @@ -2,3 +2,15 @@ access log created - .hg/hgrc respected % With -v listening at http://localhost/ +killed! +% With --prefix foo +listening at http://localhost/foo/ +killed! +% With --prefix /foo +listening at http://localhost/foo/ +killed! +% With --prefix foo/ +listening at http://localhost/foo/ +killed! +% With --prefix /foo/ +listening at http://localhost/foo/