tests: fix up some lax escaping in test-template-basic.t
authorAugie Fackler <augie@google.com>
Tue, 26 Jun 2018 11:38:58 -0400
changeset 38476 b4cfd803b3f2
parent 38475 67dc32d4e790
child 38477 de275ab362cb
tests: fix up some lax escaping in test-template-basic.t These misfired escapes turn into hard errors in Python 3.7, and I'd really rather we not work around it. We should *probably* try and find a way to proactively warn users about invalid escape sequences. There's one more failure of this type in this file on Python 3.7, but I can't figure out the issue. It'll need to be corrected in a follow-up. Differential Revision: https://phab.mercurial-scm.org/D3843
tests/test-template-basic.t
--- a/tests/test-template-basic.t	Tue Jun 26 10:36:23 2018 -0400
+++ b/tests/test-template-basic.t	Tue Jun 26 11:38:58 2018 -0400
@@ -835,11 +835,11 @@
   -o perso-
   $ hg log -R a -r 2 --template '{sub(r"\\x6e", "-", desc)}\n'
   no person
-  $ hg log -R a -r 2 --template '{sub("n", r"\x2d", desc)}\n'
+  $ hg log -R a -r 2 --template '{sub("n", r"\\x2d", desc)}\n'
   \x2do perso\x2d
   $ hg log -R a -r 2 --template '{sub("n", "\x2d", "no perso\x6e")}\n'
   -o perso-
-  $ hg log -R a -r 2 --template '{sub("n", r"\x2d", r"no perso\x6e")}\n'
+  $ hg log -R a -r 2 --template '{sub("n", r"\\x2d", r"no perso\x6e")}\n'
   \x2do perso\x6e
 
   $ hg log -R a -r 8 --template '{files % "{file}\n"}'