tests: conditionalize test-run-tests.t for Python 3.8
authorGregory Szorc <gregory.szorc@gmail.com>
Sat, 05 Oct 2019 16:23:00 -0400
changeset 43070 1d60a7825dcb
parent 43069 e554cfd93975
child 43071 830eacef67f8
tests: conditionalize test-run-tests.t for Python 3.8 It looks like Python 3.8 changed the pretty XML formatting slightly to strip some whitespace. Let's teach our tests about that. Differential Revision: https://phab.mercurial-scm.org/D6988
tests/test-run-tests.t
--- a/tests/test-run-tests.t	Sat Oct 05 17:44:54 2019 -0400
+++ b/tests/test-run-tests.t	Sat Oct 05 16:23:00 2019 -0400
@@ -403,18 +403,21 @@
   <testsuite errors="0" failures="2" name="run-tests" skipped="0" tests="3">
     <testcase name="test-success.t" time="*"/> (glob)
     <testcase name="test-failure-unicode.t" time="*"> (glob)
-      <failure message="output changed" type="output-mismatch">
-  <![CDATA[--- $TESTTMP/test-failure-unicode.t
+      <failure message="output changed" type="output-mismatch"><![CDATA[--- $TESTTMP/test-failure-unicode.t (py38 !)
+      <failure message="output changed" type="output-mismatch"> (no-py38 !)
+  <![CDATA[--- $TESTTMP/test-failure-unicode.t (no-py38 !)
   +++ $TESTTMP/test-failure-unicode.t.err
   @@ -1,2 +1,2 @@
      $ echo babar\xce\xb1 (esc)
   -  l\xce\xb5\xce\xb5t (esc)
   +  babar\xce\xb1 (esc)
-  ]]>    </failure>
+  ]]></failure> (py38 !)
+  ]]>    </failure> (no-py38 !)
     </testcase>
     <testcase name="test-failure.t" time="*"> (glob)
-      <failure message="output changed" type="output-mismatch">
-  <![CDATA[--- $TESTTMP/test-failure.t
+      <failure message="output changed" type="output-mismatch"><![CDATA[--- $TESTTMP/test-failure.t (py38 !)
+      <failure message="output changed" type="output-mismatch"> (no-py38 !)
+  <![CDATA[--- $TESTTMP/test-failure.t (no-py38 !)
   +++ $TESTTMP/test-failure.t.err
   @@ -1,5 +1,5 @@
      $ echo babar
@@ -423,7 +426,8 @@
    This is a noop statement so that
    this test is still more bytes than success.
    pad pad pad pad............................................................
-  ]]>    </failure>
+  ]]></failure> (py38 !)
+  ]]>    </failure> (no-py38 !)
     </testcase>
   </testsuite>
 
@@ -1084,8 +1088,9 @@
   <testsuite errors="0" failures="0" name="run-tests" skipped="2" tests="2">
     <testcase name="test-success.t" time="*"/> (glob)
     <testcase name="test-skip.t">
-      <skipped>
-  <![CDATA[missing feature: nail clipper]]>    </skipped>
+      <skipped><![CDATA[missing feature: nail clipper]]></skipped> (py38 !)
+      <skipped> (no-py38 !)
+  <![CDATA[missing feature: nail clipper]]>    </skipped> (no-py38 !)
     </testcase>
   </testsuite>