summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArne Becker <101113822+EbiArnie@users.noreply.github.com>2024-03-05 19:32:50 +0000
committerGitHub <noreply@github.com>2024-03-05 11:32:50 -0800
commitcc460894fde992a4bc2741741193f98de7443e78 (patch)
tree9ec43e00ee9e02cfcfac490cf51b6df359bc0fa9
parent5e09660e87f572126d9161e6e5a7a45558181696 (diff)
downloadspack-cc460894fde992a4bc2741741193f98de7443e78.tar.gz
spack-cc460894fde992a4bc2741741193f98de7443e78.tar.bz2
spack-cc460894fde992a4bc2741741193f98de7443e78.tar.xz
spack-cc460894fde992a4bc2741741193f98de7443e78.zip
perl-test-file-contents: new package (#43025)
Adds Test::File::Contents
-rw-r--r--var/spack/repos/builtin/packages/perl-test-file-contents/package.py30
1 files changed, 30 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/perl-test-file-contents/package.py b/var/spack/repos/builtin/packages/perl-test-file-contents/package.py
new file mode 100644
index 0000000000..43f9171032
--- /dev/null
+++ b/var/spack/repos/builtin/packages/perl-test-file-contents/package.py
@@ -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 PerlTestFileContents(PerlPackage):
+ """Test routines for examining the contents of files"""
+
+ homepage = "https://metacpan.org/pod/Test::File::Contents"
+ url = "https://cpan.metacpan.org/authors/id/A/AR/ARISTOTLE/Test-File-Contents-0.242.tar.gz"
+
+ maintainers("EbiArnie")
+
+ license("Artistic-1.0-Perl OR GPL-1.0-or-later")
+
+ version("0.242", sha256="a838ac0b6f6e10e89613b50ca61773cdba9ba4787ba82e7bb65daaf7084aa50b")
+
+ depends_on("perl@5.8.3:", type=("build", "link", "run", "test"))
+ depends_on("perl-text-diff@0.35:", type=("build", "run", "test"))
+
+ def test_use(self):
+ """Test 'use module'"""
+ options = ["-we", 'use strict; use Test::File::Contents; print("OK\n")']
+
+ perl = self.spec["perl"].command
+ out = perl(*options, output=str.split, error=str.split)
+ assert "OK" in out