check-code: replace heredocs in unified tests
authorIdan Kamara <idankk86@gmail.com>
Wed, 03 Oct 2012 22:09:18 +0200
changeset 17711 cf204e9829f4
parent 17710 95d29533e2ee
child 17712 c4717f44c1f1
check-code: replace heredocs in unified tests Heredocs are usually fed to other commands and shouldn't follow the standard conventions of shell commands. This restores the old behaviour of how heredocs were handled in old-style test files.
contrib/check-code.py
tests/test-check-code-hg.t
--- a/contrib/check-code.py	Wed Sep 19 20:33:20 2012 +0200
+++ b/contrib/check-code.py	Wed Oct 03 22:09:18 2012 +0200
@@ -116,6 +116,7 @@
         utestpats[i].append((p, m))
 
 utestfilters = [
+    (r"<<(\S+)((.|\n)*?\n  > \1)", rephere),
     (r"( *)(#([^\n]*\S)?)", repcomment),
 ]
 
--- a/tests/test-check-code-hg.t	Wed Sep 19 20:33:20 2012 +0200
+++ b/tests/test-check-code-hg.t	Wed Oct 03 22:09:18 2012 +0200
@@ -162,19 +162,6 @@
   tests/autodiff.py:0:
    >         ui.write('data lost for: %s\n' % fn)
    warning: unwrapped ui message
-  tests/test-convert-mtn.t:0:
-   >   > function get_passphrase(keypair_id)
-   don't use 'function', use old style
-  tests/test-import-git.t:0:
-   >   > Mc\${NkU|\`?^000jF3jhEB
-   ^ must be quoted
-  tests/test-import.t:0:
-   >   > diff -Naur proj-orig/foo proj-new/foo
-   don't use 'diff -N'
-   don't use 'diff -N'
-  tests/test-schemes.t:0:
-   >   > z = file:\$PWD/
-   don't use $PWD, use `pwd`
   tests/test-ui-color.py:0:
    > testui.warn('warning\n')
    warning: unwrapped ui message