# HG changeset patch
# User Gregory Szorc <gregory.szorc@gmail.com>
# Date 2019-10-05 19:28:52
# Node ID 830eacef67f84372a8dba49d02b123c640ee28ab
# Parent  1d60a7825dcbc914457d519a6f665931be28487f

tests: make tarball output conditional on Python version

Python 3.8 changed the default tar file archive format:
https://docs.python.org/3.8/whatsnew/3.8.html#tarfile.

This commit teaches our tests about the new behavior.

Differential Revision: https://phab.mercurial-scm.org/D6986

diff --git a/tests/test-archive.t b/tests/test-archive.t
--- a/tests/test-archive.t
+++ b/tests/test-archive.t
@@ -131,7 +131,8 @@ check http return codes
   server: testing stub value
   transfer-encoding: chunked
   
-  body: size=408, sha1=8fa06531bddecc365a9f5edb0f88b65974bfe505
+  body: size=408, sha1=8fa06531bddecc365a9f5edb0f88b65974bfe505 (no-py38 !)
+  body: size=506, sha1=70926a04cb8887d0bcccf5380488100a10222def (py-38 !)
   % tar.bz2 and zip disallowed should both give 403
   403 Archive type not allowed: bz2
   content-type: text/html; charset=ascii
@@ -159,7 +160,8 @@ check http return codes
   server: testing stub value
   transfer-encoding: chunked
   
-  body: size=426, sha1=8d87f5aba6e14f1bfea6c232985982c278b2fb0b
+  body: size=426, sha1=8d87f5aba6e14f1bfea6c232985982c278b2fb0b (no-py38 !)
+  body: size=506, sha1=1bd1f8e8d3701704bd4385038bd9c09b81c77f4e (py38 !)
   % zip and tar.gz disallowed should both give 403
   403 Archive type not allowed: zip
   content-type: text/html; charset=ascii
@@ -218,7 +220,8 @@ check http return codes (with deprecated
   server: testing stub value
   transfer-encoding: chunked
   
-  body: size=408, sha1=8fa06531bddecc365a9f5edb0f88b65974bfe505
+  body: size=408, sha1=8fa06531bddecc365a9f5edb0f88b65974bfe505 (no-py38 !)
+  body: size=506, sha1=70926a04cb8887d0bcccf5380488100a10222def (py38 !)
   % tar.bz2 and zip disallowed should both give 403
   403 Archive type not allowed: bz2
   content-type: text/html; charset=ascii
@@ -246,7 +249,8 @@ check http return codes (with deprecated
   server: testing stub value
   transfer-encoding: chunked
   
-  body: size=426, sha1=8d87f5aba6e14f1bfea6c232985982c278b2fb0b
+  body: size=426, sha1=8d87f5aba6e14f1bfea6c232985982c278b2fb0b (no-py38 !)
+  body: size=506, sha1=1bd1f8e8d3701704bd4385038bd9c09b81c77f4e (py38 !)
   % zip and tar.gz disallowed should both give 403
   403 Archive type not allowed: zip
   content-type: text/html; charset=ascii