perl-test-xml and deps: new packages (#42870)

- Adds perl-test-xml and dependency:
- Adds perl-xml-semanticdiff
This commit is contained in:
Arne Becker 2024-03-02 18:35:56 +00:00 committed by GitHub
parent ea5db048f3
commit 34c0bfefa6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 61 additions and 0 deletions

View file

@ -0,0 +1,31 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PerlTestXml(PerlPackage):
"""Compare XML in perl tests"""
homepage = "https://metacpan.org/pod/Test::XML"
url = "https://cpan.metacpan.org/authors/id/S/SE/SEMANTICO/Test-XML-0.08.tar.gz"
maintainers("EbiArnie")
license("Artistic-1.0-Perl OR GPL-1.0-or-later")
version("0.08", sha256="eb54cc23cdec860d3ad8ac8a697cbf038d0dec95229912d975c301890ca83ee2")
depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
depends_on("perl-xml-parser@2.34:", type=("build", "run", "test"))
depends_on("perl-xml-semanticdiff@0.95:", type=("build", "run", "test"))
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use Test::XML; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out

View file

@ -0,0 +1,30 @@
# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
# Spack Project Developers. See the top-level COPYRIGHT file for details.
#
# SPDX-License-Identifier: (Apache-2.0 OR MIT)
from spack.package import *
class PerlXmlSemanticdiff(PerlPackage):
"""Perl extension for comparing XML documents."""
homepage = "https://metacpan.org/pod/XML::SemanticDiff"
url = "https://cpan.metacpan.org/authors/id/P/PE/PERIGRIN/XML-SemanticDiff-1.0007.tar.gz"
maintainers("EbiArnie")
license("Artistic-1.0-Perl OR GPL-1.0-or-later")
version("1.0007", sha256="05fdefefbbc3f6b62fc7c9b5fabafb6b695ed68f0a3d958577251d1f0402a0f5")
depends_on("perl@5.8.0:", type=("build", "link", "run", "test"))
depends_on("perl-xml-parser", type=("build", "run", "test"))
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use XML::SemanticDiff; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out