From 1ee98667cc9d8f31229438309dc91881a5ebb67f Mon Sep 17 00:00:00 2001 From: Jeffery Miller Date: Wed, 18 Feb 2026 18:28:51 -0600 Subject: [PATCH] tests: Add extend-project test for additional annotations Multiple annotations can exist for the same name when extending projects. Add a test case to show this behavior. Change-Id: I12bbd25e642c7e615e32f66a1c364a39ac81902c Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/553906 Reviewed-by: Mike Frysinger Commit-Queue: Jeffery Miller Tested-by: Jeffery Miller --- tests/test_manifest_xml.py | 40 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/tests/test_manifest_xml.py b/tests/test_manifest_xml.py index 75efa95fc..5e0c78334 100644 --- a/tests/test_manifest_xml.py +++ b/tests/test_manifest_xml.py @@ -1480,6 +1480,46 @@ class ExtendProjectElementTests(ManifestParseTestCase): "", ) + def test_extend_project_annotations_multiples(self): + manifest = self.getXmlManifest( + """ + + + + + + + + + + + + +""" + ) + self.assertEqual( + [(a.name, a.value) for a in manifest.projects[0].annotations], + [ + ("foo", "bar"), + ("few", "bar"), + ("foo", "new_bar"), + ("new", "anno"), + ], + ) + self.assertEqual( + sort_attributes(manifest.ToXml().toxml()), + '' + '' + '' + '' + '' + '' + '' + '' + "" + "", + ) + class NormalizeUrlTests(ManifestParseTestCase): """Tests for normalize_url() in manifest_xml.py"""