changeset 14203:b230922eb0c3

check-code: fix checking for sh style in .t tests Restore checks after they were disabled by 64de9ca66511.
author Mads Kiilerich <mads@kiilerich.com>
date Fri, 06 May 2011 00:34:10 +0200
parents b68a41420397
children 5fa21960b2f4
files contrib/check-code.py tests/test-treediscovery.t
diffstat 2 files changed, 9 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/contrib/check-code.py	Thu May 05 20:04:49 2011 +0200
+++ b/contrib/check-code.py	Fri May 06 00:34:10 2011 +0200
@@ -95,12 +95,13 @@
   []
 ]
 
-for p, m in testpats[0] + testpats[1]:
-    if p.startswith('^'):
-        p = uprefix + p[1:]
-    else:
-        p = uprefix + p
-    utestpats.append((p, m))
+for i in [0, 1]:
+    for p, m in testpats[i]:
+        if p.startswith('^'):
+            p = uprefix + p[1:]
+        else:
+            p = uprefix + p
+        utestpats[i].append((p, m))
 
 utestfilters = [
     (r"( *)(#([^\n]*\S)?)", repcomment),
--- a/tests/test-treediscovery.t	Thu May 05 20:04:49 2011 +0200
+++ b/tests/test-treediscovery.t	Fri May 06 00:34:10 2011 +0200
@@ -11,7 +11,8 @@
 
 Setup HTTP server control:
 
-  $ export remote=http://localhost:$HGPORT/
+  $ remote=http://localhost:$HGPORT/
+  $ export remote
   $ start() {
   >   echo '[web]' > $1/.hg/hgrc
   >   echo 'push_ssl = false' >> $1/.hg/hgrc