Test::Run - A module for testing output of processes.
NAME
Test::Run - A module for testing output of processes.
SYNOPSIS
use Test::Run :runs_ok;
runs_ok :argsĀ«$*EXECUTABLE -e 'put "Hi!"'Ā», :out("Hi!\n"), 'Simple STDOUT test';
# or
Test::Run::runs_ok :argsĀ«$*EXECUTABLE -e 'put "Hi!"'Ā», :out("Hi!\n"), 'Simple STDOUT test with full sub name';
runs_ok :argsĀ«$*EXECUTABLE -Ā»,
:in('put "Hi!"; note "Bye!"; exit 1'), :out("Hi!\n"), :err("Bye!\n"), :exitcode(1),
'Output test';
# Using custom test function
use Test::Differences;
runs_ok :argsĀ«@args[] $commandĀ», :out($expected_data), "Prints correctly", :test_stdout(&eq_or_diff);
INSTALLATION
You need to have Raku and zef, then run:
zef install Test::Run:auth<zef:CIAvash>
or if you have cloned the repo:
zef install .
TESTING
prove -ve 'raku -I.' --ext rakutest
SUBS
COPYRIGHT
Copyright Ā© 2021 Siavash Askari Nasr
LICENSE
This file is part of Test::Run.
Test::Run is free software: you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
Test::Run is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License along with Test::Run. If not, see <http://www.gnu.org/licenses/>.