Skip to content

Commit

Permalink
Add p5-Test-MockFile: Validate file-interaction code that without tou…
Browse files Browse the repository at this point in the history
…ching the file system

Test::MockFile - Allows tests to validate code that can interact with
files without touching the file system.

Intercepts file system calls for specific files so unit testing can take
place without any files being altered on disk.

This is useful for small tests where file interaction is discouraged.

A strict mode is even provided (and turned on by default) which can
throw a die when files are accessed during your tests!
  • Loading branch information
schmonz committed Feb 10, 2024
1 parent f44c1d2 commit 16f8982
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 0 deletions.
10 changes: 10 additions & 0 deletions devel/p5-Test-MockFile/DESCR
@@ -0,0 +1,10 @@
Test::MockFile - Allows tests to validate code that can interact with
files without touching the file system.

Intercepts file system calls for specific files so unit testing can take
place without any files being altered on disk.

This is useful for small tests where file interaction is discouraged.

A strict mode is even provided (and turned on by default) which can
throw a die when files are accessed during your tests!
20 changes: 20 additions & 0 deletions devel/p5-Test-MockFile/Makefile
@@ -0,0 +1,20 @@
# $NetBSD: Makefile,v 1.1 2024/02/10 01:15:15 schmonz Exp $

DISTNAME= Test-MockFile-0.036
PKGNAME= p5-${DISTNAME}
CATEGORIES= devel perl5
MASTER_SITES= ${MASTER_SITE_PERL_CPAN:=Test/}

MAINTAINER= pkgsrc-users@NetBSD.org
HOMEPAGE= https://metacpan.org/pod/Test::MockFile
COMMENT= Validate file-interaction code that without touching the file system
LICENSE= artistic-2.0

DEPENDS+= p5-Overload-FileCheck>=0.013:../../devel/p5-Overload-FileCheck
DEPENDS+= p5-Text-Glob>=0:../../textproc/p5-Text-Glob

PERL5_PACKLIST= auto/Test/MockFile/.packlist
USE_LANGUAGES= # none

.include "../../lang/perl5/module.mk"
.include "../../mk/bsd.pkg.mk"
5 changes: 5 additions & 0 deletions devel/p5-Test-MockFile/distinfo
@@ -0,0 +1,5 @@
$NetBSD: distinfo,v 1.1 2024/02/10 01:15:15 schmonz Exp $

BLAKE2s (Test-MockFile-0.036.tar.gz) = 254f3adce71b129603ed5e555d645e18a525faa522f161b0890ff630b54cf277
SHA512 (Test-MockFile-0.036.tar.gz) = c648c6c984b143ed8273d63e78a657b37a2e7bcdd916e776b87dad20d081d10c0e5279672133b45ad30ea8d36c84e7e7f8c17342bf96fcf9b61c62868b3141ff
Size (Test-MockFile-0.036.tar.gz) = 59444 bytes

0 comments on commit 16f8982

Please sign in to comment.