# HG changeset patch
# User Christian Ebert <blacktrash@gmx.net>
# Date 1219306844 -7200
# Node ID 18dc6c3588eaebe3c508e20d99aeb963dce719f2
# Parent  18f235294dda58f5f5c1f8fd493bcc0eb840ab67
Thorough hgweb testing

- test hgweb while keyword extension is _enabled_
- check expansion with hgweb.file
- besides log and diff, also check annotate for not expanding

diff -r 18f235294dda -r 18dc6c3588ea tests/test-keyword
--- a/tests/test-keyword	Wed Jul 30 16:26:38 2008 +0200
+++ b/tests/test-keyword	Thu Aug 21 10:20:44 2008 +0200
@@ -285,6 +285,22 @@
 echo % kwexpand nonexistent
 hg kwexpand nonexistent 2>&1 | sed 's/nonexistent:.*/nonexistent:/'
 
+echo % hg serve
+hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
+cat hg.pid >> $DAEMON_PIDS
+echo % expansion
+echo % hgweb file
+("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/file/tip/a/?style=raw')
+echo % no expansion
+echo % hgweb annotate
+("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/annotate/tip/a/?style=raw')
+echo % hgweb changeset
+("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/tip/?style=raw')
+echo % hgweb filediff
+("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/bb948857c743/a?style=raw')
+echo % errors encountered
+cat errors.log
+
 echo % switch off expansion
 echo % kwshrink with unknown file u
 cp a u
@@ -300,13 +316,3 @@
 echo % hg cat
 hg cat sym a b
 echo
-
-echo % hg serve
-hg serve -p $HGPORT -d --pid-file=hg.pid -A access.log -E errors.log
-cat hg.pid >> $DAEMON_PIDS
-echo % hgweb changeset
-("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/rev/tip/?style=raw')
-echo % hgweb filediff
-("$TESTDIR/get-with-headers.py" localhost:$HGPORT '/diff/bb948857c743/a?style=raw')
-echo % errors encountered
-cat errors.log
diff -r 18f235294dda -r 18dc6c3588ea tests/test-keyword.out
--- a/tests/test-keyword.out	Wed Jul 30 16:26:38 2008 +0200
+++ b/tests/test-keyword.out	Thu Aug 21 10:20:44 2008 +0200
@@ -374,37 +374,28 @@
 $Xinfo$
 % kwexpand nonexistent
 nonexistent:
-% switch off expansion
-% kwshrink with unknown file u
-overwriting a shrinking keywords
-overwriting x/a shrinking keywords
-% cat
-expand $Id$
-do not process $Id:
-xxx $
-$Xinfo$
-ignore $Id$
-% hg cat
+% hg serve
+% expansion
+% hgweb file
+200 Script output follows
+
 expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
 do not process $Id:
 xxx $
 $Xinfo: User Name <user@example.com>: firstline $
-ignore $Id$
-a
-% cat
-expand $Id$
-do not process $Id:
-xxx $
-$Xinfo$
-ignore $Id$
-% hg cat
-expand $Id$
-do not process $Id:
-xxx $
-$Xinfo$
-ignore $Id$
-a
-% hg serve
+% no expansion
+% hgweb annotate
+200 Script output follows
+
+
+User Name <user@example.com>@1: expand $Id$
+User Name <user@example.com>@1: do not process $Id:
+User Name <user@example.com>@1: xxx $
+User Name <user@example.com>@2: $Xinfo$
+
+
+
+
 % hgweb changeset
 200 Script output follows
 
@@ -440,3 +431,33 @@
 
 
 % errors encountered
+% switch off expansion
+% kwshrink with unknown file u
+overwriting a shrinking keywords
+overwriting x/a shrinking keywords
+% cat
+expand $Id$
+do not process $Id:
+xxx $
+$Xinfo$
+ignore $Id$
+% hg cat
+expand $Id: a bb948857c743 Thu, 01 Jan 1970 00:00:02 +0000 user $
+do not process $Id:
+xxx $
+$Xinfo: User Name <user@example.com>: firstline $
+ignore $Id$
+a
+% cat
+expand $Id$
+do not process $Id:
+xxx $
+$Xinfo$
+ignore $Id$
+% hg cat
+expand $Id$
+do not process $Id:
+xxx $
+$Xinfo$
+ignore $Id$
+a