summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--var/spack/repos/builtin/packages/perl-test-longstring/package.py27
-rw-r--r--var/spack/repos/builtin/packages/perl-test-xml-simple/package.py34
2 files changed, 61 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/perl-test-longstring/package.py b/var/spack/repos/builtin/packages/perl-test-longstring/package.py
new file mode 100644
index 0000000000..e611ffce41
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-longstring/package.py
@@ -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
diff --git a/var/spack/repos/builtin/packages/perl-test-xml-simple/package.py b/var/spack/repos/builtin/packages/perl-test-xml-simple/package.py
new file mode 100644
index 0000000000..8ed95c6824
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-xml-simple/package.py
@@ -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