tests: escape backslash in makepatch.py inline file
authorGregory Szorc <gregory.szorc@gmail.com>
Mon, 04 Feb 2019 14:10:10 -0800
changeset 41550 7295279b9ea5
parent 41549 1ea1bba1c5be
child 41551 033a0f4b4a5f
tests: escape backslash in makepatch.py inline file This avoids some SyntaxWarning on Python 3.8 due to unescaped \. Differential Revision: https://phab.mercurial-scm.org/D5840
tests/test-import-eol.t
tests/test-mq-eol.t
--- a/tests/test-import-eol.t	Mon Feb 04 14:05:26 2019 -0800
+++ b/tests/test-import-eol.t	Mon Feb 04 14:10:10 2019 -0800
@@ -17,9 +17,9 @@
   >    'empty:stripped-crlf': b'\r\n'}[sys.argv[1]])
   > w(b' d\n')
   > w(b'-e\n')
-  > w(b'\ No newline at end of file\n')
+  > w(b'\\ No newline at end of file\n')
   > w(b'+z\r\n')
-  > w(b'\ No newline at end of file\r\n')
+  > w(b'\\ No newline at end of file\r\n')
   > EOF
 
   $ hg init repo
--- a/tests/test-mq-eol.t	Mon Feb 04 14:05:26 2019 -0800
+++ b/tests/test-mq-eol.t	Mon Feb 04 14:10:10 2019 -0800
@@ -23,9 +23,9 @@
   > w(b' c\r\n')
   > w(b' d\n')
   > w(b'-e\n')
-  > w(b'\ No newline at end of file\n')
+  > w(b'\\ No newline at end of file\n')
   > w(b'+z\r\n')
-  > w(b'\ No newline at end of file\r\n')
+  > w(b'\\ No newline at end of file\r\n')
   > EOF
 
   $ cat > cateol.py <<EOF