You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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
0 commit comments