changeset 41706:7396508ad92b

tests: use raw string in test-impexp-branch.t On first glance, the escaping of \s seems correct. However, the shell eats the escape and we're left with '\s` in the written file. Let's use a raw string so we don't have to double escape. Differential Revision: https://phab.mercurial-scm.org/D5973
author Gregory Szorc <gregory.szorc@gmail.com>
date Fri, 15 Feb 2019 13:05:01 -0800
parents 570e62f1dcf2
children 140b542b0e59
files tests/test-impexp-branch.t
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/tests/test-impexp-branch.t	Mon Feb 11 16:27:20 2019 +0100
+++ b/tests/test-impexp-branch.t	Fri Feb 15 13:05:01 2019 -0800
@@ -6,7 +6,7 @@
   > import re
   > import sys
   > 
-  > head_re = re.compile('^#(?:(?:\\s+([A-Za-z][A-Za-z0-9_]*)(?:\\s.*)?)|(?:\\s*))$')
+  > head_re = re.compile(r'^#(?:(?:\\s+([A-Za-z][A-Za-z0-9_]*)(?:\\s.*)?)|(?:\\s*))$')
   > 
   > for line in sys.stdin:
   >     hmatch = head_re.match(line)