NAME

Fred::Fish::DBUG::Test - Fred Fish library extension to Test::More

SYNOPSIS

use Fred::Fish::DBUG::Test;
  or
require Fred::Fish::DBUG::Test;

DESCRIPTION

Fred::Fish::DBUG::Test is an extension to the Fred Fish DBUG module that allows your test programs to write Test::More's output to your fish logs as well as your screen. Only for use by your module's test scripts. (t/*.t)

So see Test::More for more details on the supported functions below. Most are not supported.

Also be aware that if use threads has been used, you must source this module after it to avoid problems.

use threads;
use Fred::Fish::DBUG::Test;

FUNCTIONS

my $bool = dbug_ok ( $status, $test_name )

Writes the message to fish and then calls Test::More::ok().

my $bool = dbug_is ( $got, $expected. $test_name )

Writes the message to fish and then calls Test::More::is().

my $bool = dbug_isnt ( $got, $expected. $test_name )

Writes the message to fish and then calls Test::More::isnt().

my $bool = dbug_like ( $got, $regexpr. $test_name )

Writes the message to fish and then calls Test::More::like().

my $bool = dbug_unlike ( $got, $regexpr. $test_name )

Writes the message to fish and then calls Test::More::unlike().

my $bool = dbug_cmp_ok ( $got, $op, $expected. $test_name )

Writes the message to fish and then calls Test::More::cmp_ok().

my $bool = dbug_can_ok ( $module_or_object, @methods )

Writes the message to fish and then calls Test::More::can_ok().

my $bool = dbug_isa_ok ( $object, $class, $object_name )

Writes the message to fish and then calls Test::More::isa_ok().

my $obj = dbug_new_ok ( $class, ... )

Writes the message to fish and then calls Test::More::new_ok().

dbug_BAIL_OUT ( $message )

Writes the message to fish and then calls Test::More::done_testing() and then Test::More::BAIL_OUT($message) before terminating your test script.

CREDITS

To Fred Fish for developing the basic algorithm and putting it into the public domain! Any bugs in its implementation are purely my fault.

SEE ALSO

Fred::Fish::DBUG - The controling module which you should be using to enable this module.

Fred::Fish::DBUG::ON - The live version of the DBUG module.

Fred::Fish::DBUG::OFF - The stub version of the DBUG module.

Fred::Fish::DBUG::TIE - Allows you to trap and log STDOUT/STDERR to fish.

Fred::Fish::DBUG::Signal - Allows you to trap and log signals to fish.

Fred::Fish::DBUG::SignalKiller - Allows you to implement action DBUG_SIG_ACTION_LOG for die. Really dangerous to use. Will break most code bases.

Fred::Fish::DBUG::Tutorial - Sample code demonstrating using DBUG module.

COPYRIGHT

Copyright (c) 2024 - 2024 Curtis Leach. All rights reserved.

This program is free software. You can redistribute it and/or modify it under the same terms as Perl itself.