use strictures; # strict + fatal warnings use Test::More; use Capture::Tiny "capture"; ok 1, "1 is ok"; # Test simple truthiness. diag "Dialog always shows"; note "Notes show when running verbose tests"; # Isolate a batch of tests into a subtest. subtest "My unit tests" => sub { require_ok("DBI"); # Use your own package here. # Test methods/subs in as minimalistic/decoupled a way as possible. done_testing(1); # + whatever you add. }; subtest "My system tests" => sub { my ( $out, $err, $exit ) = capture { system qw/ ls -l -A -f /; # Your program/glue here instead. }; is $exit, 0, "Executed normally"; ok ! $err, "Without errors"; like $out, qr/\n-rw/, "Found some read/write nodes... very clumsily"; done_testing(3); }; done_testing(3);