diff tests/test_import.py @ 227:484b56ac4aec default tip

hglib: cat accepts a template argument
author Julien Cristau <jcristau@mozilla.com>
date Mon, 17 Jun 2024 17:17:58 +0200
parents a2afbf236ca8
children
line wrap: on
line diff
--- a/tests/test_import.py	Tue Mar 14 10:23:08 2023 +0100
+++ b/tests/test_import.py	Mon Jun 17 17:17:58 2024 +0200
@@ -21,6 +21,7 @@
     def test_basic_cstringio(self):
         self.client.import_(BytesIO(patch))
         self.assertEqual(self.client.cat([b('a')]), b('1\n'))
+        self.assertEqual(self.client.cat([b('a')], template=b'{path}\\0{data}'), b('a\x001\n'))
 
     def test_basic_file(self):
         f = open('patch', 'wb')
@@ -37,3 +38,4 @@
 
         self.client.import_([b('patch')])
         self.assertEqual(self.client.cat([b('a')]), b('1\n'))
+        self.assertEqual(self.client.cat([b('a')], template=b'{path}\\0{data}'), b('a\x001\n'))