diff --git a/test/test_mdf4.py b/test/test_mdf4.py index c538dfeb4..025e40821 100644 --- a/test/test_mdf4.py +++ b/test/test_mdf4.py @@ -189,6 +189,35 @@ def test_channel_with_boolean_array(self) -> None: self.assertTrue((record == signal.samples).all()) + def test_vlsd_channel_after_structure_composition(self) -> None: + """A VLSD channel that sits after a structure (composed) channel in the + same group must still find its signal data. + + ``Group.signal_data`` is indexed by channel index, so an extra entry + pushed for a composed channel shifts every following channel's VLSD + block info and makes the payload unreadable. + """ + count = 20 + timestamps = np.arange(count, dtype="