BSD Ports

devel/p5-Test-Lives 1.003 DragonFly

Decorate tests with a no-exceptions assertion

System
DragonFly
Repository
DPorts
Maintainer
[email protected] (as in FreeBSD)
License
ART10, GPLv1+
Categories
devel, perl5
Package size
10.0 KiB, 40.3 KiB installed

Description

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.

In the other systems

The newest version among them is 1.003, as upstream numbers it.

SystemPortVersionVulnerabilitiesStatusMaintainerLast update
DragonFlydevel/p5-Test-Lives1.003 newestnone known-[email protected]-
FreeBSDdevel/p5-Test-Lives1.003 newestnone known-[email protected]-
HardenedBSDdevel/p5-Test-Lives1.003 newestno data-[email protected]-
GhostBSDdevel/p5-Test-Lives1.003 newestno data-[email protected]-

Install

Binary package:

pkg install p5-Test-Lives

From DPorts:

cd /usr/dports/devel/p5-Test-Lives && make install clean

Dependency graph

Ports that need it on the left, what it needs to run on the right; at most 8 of each. "Dependencies" below lists them all.

Dependencies

Run dependencies 1

No port depends on this one.