scour: Fix another variant of the crash from #260

Signed-off-by: Niels Thykier <niels@thykier.net>
This commit is contained in:
Niels Thykier 2020-09-18 18:30:24 +00:00
parent 92e64f0d7f
commit 476ad1765d
No known key found for this signature in database
GPG key ID: A65B78DBE67C7AAC
4 changed files with 49 additions and 30 deletions

View file

@ -2099,6 +2099,12 @@ class GroupSiblingMerge(unittest.TestCase):
self.assertEqual(doc.getElementsByTagName('g').length, 8,
'Sibling merging is disabled by --disable-group-collapsing')
def test_sibling_merge_crash(self):
doc = scourXmlFile('unittests/group-sibling-merge-crash.svg',
parse_args(['']))
self.assertEqual(doc.getElementsByTagName('g').length, 1,
'Sibling merge should work without causing crashes')
class GroupCreation(unittest.TestCase):