git: a6bf1fb90351 - main - devel/p5-Test-Lives: Add p5-Test-Lives 1.003

From: Po-Chuan Hsieh <sunpoet_at_FreeBSD.org>
Date: Sun, 04 Sep 2022 03:52:12 UTC
The branch main has been updated by sunpoet:

URL: https://cgit.FreeBSD.org/ports/commit/?id=a6bf1fb90351bc87394aad4a719078119f6c7b4c

commit a6bf1fb90351bc87394aad4a719078119f6c7b4c
Author:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
AuthorDate: 2022-09-04 03:41:27 +0000
Commit:     Po-Chuan Hsieh <sunpoet@FreeBSD.org>
CommitDate: 2022-09-04 03:41:27 +0000

    devel/p5-Test-Lives: Add p5-Test-Lives 1.003
    
    Test::Lives provides only one function, lives_and, which works almost exactly
    like the function of the same name in Test::Exception. That is, it allows you to
    test things that could (but shouldn't) throw an exception without having to have
    two separate tests with two separate results (and two separate descriptions).
    
    You pass it a block of code to run (which should contain one test assertion) and
    a test description to give the assertion inside the block.
    
    The description will be available inside the block in the $_ variable. (This is
    different from Test::Exception, which employs hacky magic to relieve you of
    having to pass the description to the decorated assertion.)
    
    If the block ends up throwing an exception, a test failure will be logged.
    
    WWW: https://metacpan.org/dist/Test-Lives
---
 devel/Makefile                |  1 +
 devel/p5-Test-Lives/Makefile  | 19 +++++++++++++++++++
 devel/p5-Test-Lives/distinfo  |  3 +++
 devel/p5-Test-Lives/pkg-descr | 15 +++++++++++++++
 devel/p5-Test-Lives/pkg-plist |  2 ++
 5 files changed, 40 insertions(+)

diff --git a/devel/Makefile b/devel/Makefile
index 741f1743a8e9..a948464994da 100644
--- a/devel/Makefile
+++ b/devel/Makefile
@@ -3442,6 +3442,7 @@
     SUBDIR += p5-Test-LeakTrace
     SUBDIR += p5-Test-LectroTest
     SUBDIR += p5-Test-Lib
+    SUBDIR += p5-Test-Lives
     SUBDIR += p5-Test-LoadAllModules
     SUBDIR += p5-Test-Log-Log4perl
     SUBDIR += p5-Test-Log4perl
diff --git a/devel/p5-Test-Lives/Makefile b/devel/p5-Test-Lives/Makefile
new file mode 100644
index 000000000000..88b6b293c015
--- /dev/null
+++ b/devel/p5-Test-Lives/Makefile
@@ -0,0 +1,19 @@
+PORTNAME=	Test-Lives
+PORTVERSION=	1.003
+CATEGORIES=	devel perl5
+MASTER_SITES=	CPAN
+PKGNAMEPREFIX=	p5-
+
+MAINTAINER=	sunpoet@FreeBSD.org
+COMMENT=	Decorate tests with a no-exceptions assertion
+
+LICENSE=	ART10 GPLv1+
+LICENSE_COMB=	dual
+LICENSE_FILE=	${WRKSRC}/LICENSE
+
+USES=		perl5
+USE_PERL5=	configure
+
+NO_ARCH=	yes
+
+.include <bsd.port.mk>
diff --git a/devel/p5-Test-Lives/distinfo b/devel/p5-Test-Lives/distinfo
new file mode 100644
index 000000000000..a0cf0988573c
--- /dev/null
+++ b/devel/p5-Test-Lives/distinfo
@@ -0,0 +1,3 @@
+TIMESTAMP = 1662212100
+SHA256 (Test-Lives-1.003.tar.gz) = d811b18522161116dd5d45dd1711d6f7178cf64d00b5316c0bcfe4a6f86a6d94
+SIZE (Test-Lives-1.003.tar.gz) = 11115
diff --git a/devel/p5-Test-Lives/pkg-descr b/devel/p5-Test-Lives/pkg-descr
new file mode 100644
index 000000000000..f6705e501b2e
--- /dev/null
+++ b/devel/p5-Test-Lives/pkg-descr
@@ -0,0 +1,15 @@
+Test::Lives provides only one function, lives_and, which works almost exactly
+like the function of the same name in Test::Exception. That is, it allows you to
+test things that could (but shouldn't) throw an exception without having to have
+two separate tests with two separate results (and two separate descriptions).
+
+You pass it a block of code to run (which should contain one test assertion) and
+a test description to give the assertion inside the block.
+
+The description will be available inside the block in the $_ variable. (This is
+different from Test::Exception, which employs hacky magic to relieve you of
+having to pass the description to the decorated assertion.)
+
+If the block ends up throwing an exception, a test failure will be logged.
+
+WWW: https://metacpan.org/dist/Test-Lives
diff --git a/devel/p5-Test-Lives/pkg-plist b/devel/p5-Test-Lives/pkg-plist
new file mode 100644
index 000000000000..d41c8f126c90
--- /dev/null
+++ b/devel/p5-Test-Lives/pkg-plist
@@ -0,0 +1,2 @@
+%%SITE_PERL%%/Test/Lives.pm
+%%PERL5_MAN3%%/Test::Lives.3.gz