perl-test-xml-simple and deps: new packages (#42873)
* perl-test-longstring: New package Adds Test::LongString * perl-test-xml-simple: new package - Adds perl-test-xml-simple
This commit is contained in:
parent
34c0bfefa6
commit
a5b7cb6e6f
@ -0,0 +1,27 @@
|
|||||||
|
# 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 PerlTestLongstring(PerlPackage):
|
||||||
|
"""Tests strings for equality, with more helpful failures"""
|
||||||
|
|
||||||
|
homepage = "https://metacpan.org/pod/Test::LongString"
|
||||||
|
url = "https://cpan.metacpan.org/authors/id/R/RG/RGARCIA/Test-LongString-0.17.tar.gz"
|
||||||
|
|
||||||
|
maintainers("EbiArnie")
|
||||||
|
|
||||||
|
license("Artistic-1.0-Perl OR GPL-1.0-or-later")
|
||||||
|
|
||||||
|
version("0.17", sha256="abc4349eaf04d1bec1e464166a3018591ea846d8f3c5c9c8af4ac4905d3e974f")
|
||||||
|
|
||||||
|
def test_use(self):
|
||||||
|
"""Test 'use module'"""
|
||||||
|
options = ["-we", 'use strict; use Test::LongString; print("OK\n")']
|
||||||
|
|
||||||
|
perl = self.spec["perl"].command
|
||||||
|
out = perl(*options, output=str.split, error=str.split)
|
||||||
|
assert "OK" in out
|
@ -0,0 +1,34 @@
|
|||||||
|
# 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 PerlTestXmlSimple(PerlPackage):
|
||||||
|
"""Easy testing for XML"""
|
||||||
|
|
||||||
|
homepage = "https://metacpan.org/pod/Test::XML::Simple"
|
||||||
|
url = "https://cpan.metacpan.org/authors/id/M/MC/MCMAHON/Test-XML-Simple-1.05.tar.gz"
|
||||||
|
|
||||||
|
maintainers("EbiArnie")
|
||||||
|
|
||||||
|
license("Artistic-1.0")
|
||||||
|
|
||||||
|
version("1.05", sha256="c60801a3459e7bdad4cd8007a3c94aede818a829d74e70261e6c2758b227bd53")
|
||||||
|
|
||||||
|
depends_on("perl-test-longstring", type=("build", "run", "test"))
|
||||||
|
depends_on("perl-xml-libxml@1.99:", type=("build", "run", "test"))
|
||||||
|
|
||||||
|
# The test suite from upstream is failing, so we just skip the tests
|
||||||
|
def check(self):
|
||||||
|
pass
|
||||||
|
|
||||||
|
def test_use(self):
|
||||||
|
"""Test 'use module'"""
|
||||||
|
options = ["-we", 'use strict; use Test::XML::Simple; print("OK\n")']
|
||||||
|
|
||||||
|
perl = self.spec["perl"].command
|
||||||
|
out = perl(*options, output=str.split, error=str.split)
|
||||||
|
assert "OK" in out
|
Loading…
Reference in New Issue
Block a user