changeset 5971:6d5ecf824a65

tests for hg serve prefix option
author Michele Cella <michele.cella@gmail.com>
date Tue, 22 Jan 2008 23:06:37 +0100
parents f25070ecf334
children d83020d0466f
files tests/test-serve tests/test-serve.out
diffstat 2 files changed, 36 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-serve	Tue Jan 22 22:13:29 2008 +0100
+++ b/tests/test-serve	Tue Jan 22 23:06:37 2008 +0100
@@ -16,3 +16,27 @@
 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"
--- a/tests/test-serve.out	Tue Jan 22 22:13:29 2008 +0100
+++ b/tests/test-serve.out	Tue Jan 22 23:06:37 2008 +0100
@@ -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/