tests/test-extension
changeset 9661 c4f6c02e33c4
parent 9410 1c83938b6a8e
child 9802 4ce13d7c6b88
--- a/tests/test-extension	Wed Oct 28 23:55:23 2009 +0900
+++ b/tests/test-extension	Wed Oct 28 23:59:18 2009 +0900
@@ -75,6 +75,20 @@
 # command with no output, we just want to see the extensions loaded
 hg paths
 
+# check hgweb's load order
+echo '% hgweb.cgi'
+cat > hgweb.cgi <<EOF
+#!/usr/bin/env python
+from mercurial import demandimport; demandimport.enable()
+from mercurial.hgweb import hgweb
+from mercurial.hgweb import wsgicgi
+
+application = hgweb('.', 'test repo')
+wsgicgi.launch(application)
+EOF
+SCRIPT_NAME='/' SERVER_PORT='80' SERVER_NAME='localhost' python hgweb.cgi \
+    | grep '^[[:digit:]]) [[:alnum:] ]*$'  # ignores HTML output
+
 echo 'foo = !' >> $HGRCPATH
 echo 'bar = !' >> $HGRCPATH