Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add p5-Test-Mock-Cmd: Mock system(), exec(), and qx() for testing
Mock system(), exec(), qx() (AKA `` and readpipe()) with your own functions in order to test code that may call them. Some uses might be: - avoid actually running the system command, just pretend we did (simulate [un]expected output, return values, etc) - test various return value handling (e.g. the system command core dumps how does the object handle that) - test that the arguments that will be passed to a system command are correct - simulate that really hard to reproduce low level edge case to make sure your code works correctly on affected systems - etc etc
- Loading branch information
Showing
3 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
Mock system(), exec(), qx() (AKA `` and readpipe()) with your own | ||
functions in order to test code that may call them. | ||
|
||
Some uses might be: | ||
|
||
- avoid actually running the system command, just pretend we did | ||
(simulate [un]expected output, return values, etc) | ||
- test various return value handling (e.g. the system command core dumps | ||
how does the object handle that) | ||
- test that the arguments that will be passed to a system command | ||
are correct | ||
- simulate that really hard to reproduce low level edge case to make | ||
sure your code works correctly on affected systems | ||
- etc etc |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# $NetBSD: Makefile,v 1.1 2024/02/10 01:15:39 schmonz Exp $ | ||
|
||
DISTNAME= Test-Mock-Cmd-0.7 | ||
PKGNAME= p5-${DISTNAME} | ||
CATEGORIES= devel perl5 | ||
MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=authors/id/D/DM/DMUEY/} | ||
|
||
MAINTAINER= pkgsrc-users@NetBSD.org | ||
HOMEPAGE= https://metacpan.org/pod/Test::Mock::Cmd | ||
COMMENT= Mock system(), exec(), and qx() for testing | ||
LICENSE= ${PERL5_LICENSE} | ||
|
||
DEPENDS+= p5-Test-Carp-[0-9]*:../../devel/p5-Test-Carp | ||
|
||
PERL5_MODULE_TYPE= Module::Build | ||
PERL5_PACKLIST= auto/Test/Mock/Cmd/.packlist | ||
USE_LANGUAGES= # none | ||
|
||
.include "../../lang/perl5/module.mk" | ||
.include "../../mk/bsd.pkg.mk" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
$NetBSD: distinfo,v 1.1 2024/02/10 01:15:39 schmonz Exp $ | ||
|
||
BLAKE2s (Test-Mock-Cmd-0.7.tar.gz) = 59aeb53c826f8e99773630179c86214234a031abad722b37d03b6259eb929899 | ||
SHA512 (Test-Mock-Cmd-0.7.tar.gz) = 5791b27e425fc7d28f7027935ab92f6f0c45fff2647dfdbc3e1b94b578e977659dc9896e56b06052139ad5ff6d063ec5f8bea4700ab3a7de9fbcaf49a765423b | ||
Size (Test-Mock-Cmd-0.7.tar.gz) = 9178 bytes |