Patchwork D5842: testparseutil: escape backslash in docstring

login
register
mail settings
Submitter phabricator
Date Feb. 4, 2019, 11:38 p.m.
Message ID <5d48b618a2ec6d6b4ced5312077f2417@localhost.localdomain>
Download mbox | patch
Permalink /patch/38418/
State Not Applicable
Headers show

Comments

phabricator - Feb. 4, 2019, 11:38 p.m.
This revision was automatically updated to reflect the committed changes.
Closed by commit rHG99b4c6d73a72: testparseutil: escape backslash in docstring (authored by indygreg, committed by ).

REPOSITORY
  rHG Mercurial

CHANGES SINCE LAST UPDATE
  https://phab.mercurial-scm.org/D5842?vs=13769&id=13796

REVISION DETAIL
  https://phab.mercurial-scm.org/D5842

AFFECTED FILES
  contrib/testparseutil.py

CHANGE DETAILS




To: indygreg, #hg-reviewers
Cc: mercurial-devel

Patch

diff --git a/contrib/testparseutil.py b/contrib/testparseutil.py
--- a/contrib/testparseutil.py
+++ b/contrib/testparseutil.py
@@ -265,7 +265,7 @@ 
 class fileheredocmatcher(embeddedmatcher):
     """Detect "cat > FILE << LIMIT" style embedded code
 
-    >>> matcher = fileheredocmatcher(b'heredoc .py file', br'[^<]+\.py')
+    >>> matcher = fileheredocmatcher(b'heredoc .py file', br'[^<]+\\.py')
     >>> b2s(matcher.startsat(b'  $ cat > file.py << EOF\\n'))
     ('file.py', '  > EOF\\n')
     >>> b2s(matcher.startsat(b'  $ cat   >>file.py   <<EOF\\n'))