Skip to content

Commit 4cd7fe3

Browse files
committed
Add test for no-name
1 parent d8ff261 commit 4cd7fe3

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

tests/test_gzip_compliance.py

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -898,3 +898,15 @@ def test_decompress_cannot_have_flags_compression(self):
898898
b'-0/--fast',
899899
err)
900900
self.assertEqual(out, b'')
901+
902+
@create_and_remove_directory(TEMPDIR)
903+
def test_compress_no_name(self):
904+
args = sys.executable, '-m', 'isal.igzip', '-n'
905+
with Popen(args, stdin=PIPE, stdout=PIPE, stderr=PIPE) as proc:
906+
out, err = proc.communicate(self.data)
907+
908+
self.assertEqual(err, b'')
909+
self.assertEqual(out[:2], b"\x1f\x8b")
910+
# Assert filename and mtime are not stored
911+
self.assertFalse(out[4] & gzip.FNAME)
912+
self.assertEqual(out[4:8], b"\x00\x00\x00\x00")

0 commit comments

Comments
 (0)