Path to this page:
Subject: CVS commit: pkgsrc/devel/p5-Test-Mock-Cmd
From: Amitai Schleier
Date: 2024-02-10 02:15:39
Message id: 20240210011539.C32C6FA42@cvs.NetBSD.org
Log Message:
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
Files: