Fix invalid DEFINED BY offset calculation for EXPL tagged objects
[pyderasn.git] / tests / test_pyderasn.py
index 317ed91b078e30ab36d3f96a9e2877c26189b89c..13322d7b454679e13d5f9e97d40fb9313729a12e 100644 (file)
@@ -5003,6 +5003,9 @@ class TestDefinesByPath(TestCase):
         self.assertIsNotNone(seq_integered["value"].defined)
         self.assertEqual(seq_integered["value"].defined[0], type_integered)
         self.assertEqual(seq_integered["value"].defined[1], Integer(123))
+        self.assertTrue(seq_integered_raw[
+            seq_integered["value"].defined[1].offset:
+        ].startswith(Integer(123).encode()))
 
         seq_sequenced, _ = Seq().decode(
             seq_sequenced_raw,