perl-test-pod-coverage and deps: new packages (#43028)

Adds Test::Pod::Coverage and its dependencies.
Installed OK with build-time tests. Added dependencies:
- Pod::Coverage
This commit is contained in:
Arne Becker 2024-03-05 19:28:28 +00:00 committed by GitHub
parent a247879be3
commit 99002027c4
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 58 additions and 0 deletions

View file

@ -0,0 +1,28 @@
# 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 PerlPodCoverage(PerlPackage):
"""Checks if the documentation of a module is comprehensive"""
homepage = "https://metacpan.org/pod/Pod::Coverage"
url = "https://cpan.metacpan.org/authors/id/R/RC/RCLAMP/Pod-Coverage-0.23.tar.gz"
maintainers("EbiArnie")
version("0.23", sha256="30b7a0b0c942f44a7552c0d34e9b1f2e0ba0b67955c61e3b1589ec369074b107")
depends_on("perl-devel-symdump@2.01:", type=("build", "run", "test"))
depends_on("perl-pod-parser@1.13:", type=("build", "run", "test"))
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use Pod::Coverage; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out

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 PerlTestPodCoverage(PerlPackage):
"""Check for pod coverage in your distribution"""
homepage = "https://metacpan.org/pod/Test::Pod::Coverage"
url = "https://cpan.metacpan.org/authors/id/N/NE/NEILB/Test-Pod-Coverage-1.10.tar.gz"
maintainers("EbiArnie")
license("Artistic-2.0")
version("1.10", sha256="48c9cca9f7d99eee741176445b431adf09c029e1aa57c4703c9f46f7601d40d4")
depends_on("perl@5.6.0:", type=("build", "link", "run", "test"))
depends_on("perl-pod-coverage", type=("build", "run", "test"))
def test_use(self):
"""Test 'use module'"""
options = ["-we", 'use strict; use Test::Pod::Coverage; print("OK\n")']
perl = self.spec["perl"].command
out = perl(*options, output=str.split, error=str.split)
assert "OK" in out