perl-test-file-contents: new package (#43025)

Adds Test::File::Contents
This commit is contained in:
Arne Becker 2024-03-05 19:32:50 +00:00 committed by GitHub
parent 5e09660e87
commit cc460894fd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

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 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