tests/test-archive.t
changeset 42940 c04e0836f039
parent 41316 8df3471931cc
child 43071 830eacef67f8
--- a/tests/test-archive.t	Sun Sep 15 22:43:32 2019 +0900
+++ b/tests/test-archive.t	Tue Sep 17 10:47:31 2019 +0000
@@ -566,6 +566,19 @@
   *172*80*00:00*old/.hg_archival.txt (glob)
   *0*80*00:00*old/old (glob)
 
+test xz support only available in Python 3.4
+
+#if py3
+  $ hg archive ../archive.txz
+  $ xz -l ../archive.txz | head -n1
+  Strms  Blocks   Compressed Uncompressed  Ratio  Check   Filename
+  $ rm -f ../archive.txz
+#else
+  $ hg archive ../archive.txz
+  abort: xz compression is only available in Python 3
+  [255]
+#endif
+
 show an error when a provided pattern matches no files
 
   $ hg archive -I file_that_does_not_exist.foo ../empty.zip