perl-test-perl-critic: new package (#43027)

Adds Test::Perl::Critic
This commit is contained in:
Arne Becker 2024-03-05 19:30:12 +00:00 committed by GitHub
parent 99002027c4
commit 5a8efb3b14
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 PerlTestPerlCritic(PerlPackage):
"""Use Perl::Critic in test programs."""
homepage = "https://metacpan.org/pod/Test::Perl::Critic"
url = "https://cpan.metacpan.org/authors/id/P/PE/PETDANCE/Test-Perl-Critic-1.04.tar.gz"
maintainers("EbiArnie")
license("Artistic-1.0-Perl OR GPL-1.0-or-later")
version("1.04", sha256="28f806b5412c7908b56cf1673084b8b44ce1cb54c9417d784d91428e1a04096e")
depends_on("perl-mce@1.827:", type=("build", "run", "test"))
depends_on("perl-perl-critic@1.105:", type=("build", "run", "test"))
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use Test::Perl::Critic; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out