changeset 6927:959113c5e1cd

keyword: 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
author Christian Ebert <blacktrash@gmx.net>
date Thu, 21 Aug 2008 10:20:44 +0200
parents 57b954d8d003
children a58a611c320f
files tests/test-keyword tests/test-keyword.out
diffstat 2 files changed, 64 insertions(+), 37 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-keyword	Tue Jul 22 18:23:20 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
--- a/tests/test-keyword.out	Tue Jul 22 18:23:20 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