--- a/tests/test-serve Tue Mar 18 04:07:39 2008 -0300
+++ b/tests/test-serve Mon Mar 17 16:15:43 2008 +0100
@@ -1,5 +1,15 @@
#!/bin/sh
+hgserve()
+{
+ hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -v $@ \
+ | sed -e 's/:[0-9][0-9]*//g' -e 's/localhost\.localdomain/localhost/'
+ cat hg.pid >> "$DAEMON_PIDS"
+ sleep 1
+ kill `cat hg.pid`
+ sleep 1
+}
+
hg init test
cd test
@@ -14,38 +24,16 @@
fi
echo % With -v
-hg serve -a localhost -p $HGPORT1 -d --pid-file=hg.pid -v \
- | sed -e 's/:[0-9][0-9]*//g' -e 's/localhost\.localdomain/localhost/'
-cat hg.pid >> "$DAEMON_PIDS"
-sleep 1
-kill `cat hg.pid`
-sleep 1
+hgserve
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]*//g' -e 's/localhost\.localdomain/localhost/'
-cat hg.pid >> "$DAEMON_PIDS"
-sleep 1
-kill `cat hg.pid`
-sleep 1
+hgserve --prefix foo
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]*//g' -e 's/localhost\.localdomain/localhost/'
-cat hg.pid >> "$DAEMON_PIDS"
-sleep 1
-kill `cat hg.pid`
-sleep 1
+hgserve --prefix /foo
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]*//g' -e 's/localhost\.localdomain/localhost/'
-cat hg.pid >> "$DAEMON_PIDS"
-sleep 1
-kill `cat hg.pid`
-sleep 1
+hgserve --prefix foo/
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]*//g' -e 's/localhost\.localdomain/localhost/'
-cat hg.pid >> "$DAEMON_PIDS"
+hgserve --prefix /foo/