comps: Add get_langpacks function
This also simplifies the test data by removing a lot of the langpacks. Signed-off-by: Lubomír Sedlář <lsedlar@redhat.com>
This commit is contained in:
parent
9b576bf976
commit
16ac225013
6 changed files with 17 additions and 76 deletions
19
tests/fixtures/comps-env.xml
vendored
19
tests/fixtures/comps-env.xml
vendored
|
|
@ -99,27 +99,8 @@
|
|||
</grouplist>
|
||||
</environment>
|
||||
<langpacks>
|
||||
<match install="LabPlot-doc-%s" name="LabPlot-doc"/>
|
||||
<match install="aspell-%s" name="aspell"/>
|
||||
<match install="autocorr-%s" name="autocorr-en"/>
|
||||
<match install="calligra-l10n-%s" name="calligra-core"/>
|
||||
<match install="childsplay-alphabet_sounds_%s" name="childsplay"/>
|
||||
<match install="dummy-release-notes-%s" name="dummy-release-notes"/>
|
||||
<match install="eclipse-nls-%s" name="eclipse-platform"/>
|
||||
<match install="firefox-langpack-%s" name="firefox"/>
|
||||
<match install="gcompris-sound-%s" name="gcompris"/>
|
||||
<match install="gimp-help-%s" name="gimp-help"/>
|
||||
<match install="hunspell-%s" name="hunspell"/>
|
||||
<match install="hyphen-%s" name="hyphen"/>
|
||||
<match install="kde-l10n-%s" name="kdelibs"/>
|
||||
<match install="kde-i18n-%s" name="kdelibs3"/>
|
||||
<match install="libreoffice-langpack-%s" name="libreoffice-core"/>
|
||||
<match install="man-pages-%s" name="man-pages"/>
|
||||
<match install="moodle-%s" name="moodle"/>
|
||||
<match install="mythes-%s" name="mythes"/>
|
||||
<match install="nqc-doc-%s" name="nqc-doc"/>
|
||||
<match install="openoffice.org-langpack-%s" name="openoffice.org-core"/>
|
||||
<match install="tesseract-langpack-%s" name="tesseract"/>
|
||||
<match install="tkgate-%s" name="tkgate"/>
|
||||
</langpacks>
|
||||
</comps>
|
||||
|
|
|
|||
19
tests/fixtures/comps-formatted.xml
vendored
19
tests/fixtures/comps-formatted.xml
vendored
|
|
@ -113,27 +113,8 @@
|
|||
</grouplist>
|
||||
</environment>
|
||||
<langpacks>
|
||||
<match install="LabPlot-doc-%s" name="LabPlot-doc"/>
|
||||
<match install="aspell-%s" name="aspell"/>
|
||||
<match install="autocorr-%s" name="autocorr-en"/>
|
||||
<match install="calligra-l10n-%s" name="calligra-core"/>
|
||||
<match install="childsplay-alphabet_sounds_%s" name="childsplay"/>
|
||||
<match install="dummy-release-notes-%s" name="dummy-release-notes"/>
|
||||
<match install="eclipse-nls-%s" name="eclipse-platform"/>
|
||||
<match install="firefox-langpack-%s" name="firefox"/>
|
||||
<match install="gcompris-sound-%s" name="gcompris"/>
|
||||
<match install="gimp-help-%s" name="gimp-help"/>
|
||||
<match install="hunspell-%s" name="hunspell"/>
|
||||
<match install="hyphen-%s" name="hyphen"/>
|
||||
<match install="kde-l10n-%s" name="kdelibs"/>
|
||||
<match install="kde-i18n-%s" name="kdelibs3"/>
|
||||
<match install="libreoffice-langpack-%s" name="libreoffice-core"/>
|
||||
<match install="man-pages-%s" name="man-pages"/>
|
||||
<match install="moodle-%s" name="moodle"/>
|
||||
<match install="mythes-%s" name="mythes"/>
|
||||
<match install="nqc-doc-%s" name="nqc-doc"/>
|
||||
<match install="openoffice.org-langpack-%s" name="openoffice.org-core"/>
|
||||
<match install="tesseract-langpack-%s" name="tesseract"/>
|
||||
<match install="tkgate-%s" name="tkgate"/>
|
||||
</langpacks>
|
||||
</comps>
|
||||
|
|
|
|||
19
tests/fixtures/comps-group.xml
vendored
19
tests/fixtures/comps-group.xml
vendored
|
|
@ -79,27 +79,8 @@
|
|||
</grouplist>
|
||||
</environment>
|
||||
<langpacks>
|
||||
<match install="LabPlot-doc-%s" name="LabPlot-doc"/>
|
||||
<match install="aspell-%s" name="aspell"/>
|
||||
<match install="autocorr-%s" name="autocorr-en"/>
|
||||
<match install="calligra-l10n-%s" name="calligra-core"/>
|
||||
<match install="childsplay-alphabet_sounds_%s" name="childsplay"/>
|
||||
<match install="dummy-release-notes-%s" name="dummy-release-notes"/>
|
||||
<match install="eclipse-nls-%s" name="eclipse-platform"/>
|
||||
<match install="firefox-langpack-%s" name="firefox"/>
|
||||
<match install="gcompris-sound-%s" name="gcompris"/>
|
||||
<match install="gimp-help-%s" name="gimp-help"/>
|
||||
<match install="hunspell-%s" name="hunspell"/>
|
||||
<match install="hyphen-%s" name="hyphen"/>
|
||||
<match install="kde-l10n-%s" name="kdelibs"/>
|
||||
<match install="kde-i18n-%s" name="kdelibs3"/>
|
||||
<match install="libreoffice-langpack-%s" name="libreoffice-core"/>
|
||||
<match install="man-pages-%s" name="man-pages"/>
|
||||
<match install="moodle-%s" name="moodle"/>
|
||||
<match install="mythes-%s" name="mythes"/>
|
||||
<match install="nqc-doc-%s" name="nqc-doc"/>
|
||||
<match install="openoffice.org-langpack-%s" name="openoffice.org-core"/>
|
||||
<match install="tesseract-langpack-%s" name="tesseract"/>
|
||||
<match install="tkgate-%s" name="tkgate"/>
|
||||
</langpacks>
|
||||
</comps>
|
||||
|
|
|
|||
19
tests/fixtures/comps.xml
vendored
19
tests/fixtures/comps.xml
vendored
|
|
@ -126,28 +126,9 @@
|
|||
<!-- LANGPACKS -->
|
||||
|
||||
<langpacks>
|
||||
<match install="LabPlot-doc-%s" name="LabPlot-doc"/>
|
||||
<match install="aspell-%s" name="aspell"/>
|
||||
<match install="autocorr-%s" name="autocorr-en"/>
|
||||
<match install="calligra-l10n-%s" name="calligra-core"/>
|
||||
<match install="childsplay-alphabet_sounds_%s" name="childsplay"/>
|
||||
<match install="eclipse-nls-%s" name="eclipse-platform"/>
|
||||
<match install="firefox-langpack-%s" name="firefox"/>
|
||||
<match install="gcompris-sound-%s" name="gcompris"/>
|
||||
<match install="gimp-help-%s" name="gimp-help"/>
|
||||
<match install="hunspell-%s" name="hunspell"/>
|
||||
<match install="hyphen-%s" name="hyphen"/>
|
||||
<match install="kde-l10n-%s" name="kdelibs"/>
|
||||
<match install="kde-i18n-%s" name="kdelibs3"/>
|
||||
<match install="libreoffice-langpack-%s" name="libreoffice-core"/>
|
||||
<match install="man-pages-%s" name="man-pages"/>
|
||||
<match install="moodle-%s" name="moodle"/>
|
||||
<match install="mythes-%s" name="mythes"/>
|
||||
<match install="nqc-doc-%s" name="nqc-doc"/>
|
||||
<match install="openoffice.org-langpack-%s" name="openoffice.org-core"/>
|
||||
<match install="tesseract-langpack-%s" name="tesseract"/>
|
||||
<match install="tkgate-%s" name="tkgate"/>
|
||||
<match install="dummy-release-notes-%s" name="dummy-release-notes"/>
|
||||
</langpacks>
|
||||
|
||||
<!-- CATEGORIES -->
|
||||
|
|
|
|||
|
|
@ -48,6 +48,17 @@ class CompsWrapperTest(unittest.TestCase):
|
|||
sorted(comps.get_packages('text-internet')),
|
||||
sorted(['dummy-elinks', 'dummy-tftp']))
|
||||
|
||||
def test_get_langpacks(self):
|
||||
comps = CompsWrapper(COMPS_FILE)
|
||||
self.assertEqual(
|
||||
comps.get_langpacks(),
|
||||
{
|
||||
"aspell": "aspell-%s",
|
||||
"firefox": "firefox-langpack-%s",
|
||||
"kdelibs": "kde-l10n-%s",
|
||||
}
|
||||
)
|
||||
|
||||
def test_get_packages_for_non_existing_group(self):
|
||||
comps = CompsWrapper(COMPS_FILE)
|
||||
with self.assertRaises(KeyError):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue