diff --git a/tests/ncz_test.py b/tests/ncz_test.py index 21a67de6..14554cc6 100644 --- a/tests/ncz_test.py +++ b/tests/ncz_test.py @@ -163,6 +163,23 @@ class UnpackTest(unittest.TestCase): ncz.unpack(self.padded_nsz((-1,), truncate=True), self.dir / 'out.nsp') self.assertFalse((self.dir / 'out.nsp').exists()) + def test_block_of_the_wrong_size_is_a_damaged_file(self): + """The installer turns DamagedFile into check.input_damaged, which asks for a fresh copy of the file.""" + def short(data): + head = ncz.HEADER + 16 + 0x40 * len(SECTIONS) + count = struct.unpack_from('