tests: use raw string in test-impexp-branch.t
authorGregory Szorc <gregory.szorc@gmail.com>
Fri, 15 Feb 2019 13:05:01 -0800
changeset 41706 7396508ad92b
parent 41705 570e62f1dcf2
child 41707 140b542b0e59
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
tests/test-impexp-branch.t
--- 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)