Test AN::Tools

From Alteeve Wiki
Jump to navigation Jump to search

 AN!Tools :: AN::Tools :: Test AN::Tools

Note: For development, this is in a 'test.pl' file, not in 't/Tools.t'. When the modules reach release, this will be changed and the tests will be run by the Makefile.pl.


#!/usr/bin/perl -Tw
# This is the test script for the AN::Tools family of modules.

	push @INC, "..";

# This just sets perl to be strict about how it runs.
use strict;
use warnings;
my $VERSION=0.0.001;

# Setup for UTF-8 mode.
# use utf8;
# binmode STDOUT, ":utf8:";

# Call in the test module
# use Test::More tests => 65;
use Test::More 'no_plan';

# Load my module via 'use_ok' test.
	print "Will now test AN::Tools on $^O.\n";
	use_ok('AN::Tools', 0.0.001);

# Test the main module object.e
# my $an=AN::Tools->new({String=>{force_utf8=>1}});
my $an=AN::Tools->new();
like($an, qr/^AN::Tools=HASH\(0x\w+\)$/, "AN::Tools object appears valid.");
my @methods=(
can_ok("AN::Tools", @methods);
is($an->error(), "", "error() is initially blank.");
is($an->error_code(), 0, "error_code() is initially '0'.");
is($an->_math_bigint_loaded, 0, "_math_bigint_loaded() is initially '0'.");

### test AN::Tools::Alert
print "Testing AN::Tools::Alert\n";

### Test AN::Tools::Math
print "Testing AN::Tools::Math\n";

### Test AN::Tools::Readable
print "Testing AN::Tools::Readable\n";

### Test AN::Tools::String
print "Testing AN::Tools::String\n";

exit 0;


Any questions, feedback, advice, complaints or meanderings are welcome.
Alteeve's Niche! Enterprise Support:
Alteeve Support
Community Support
© Alteeve's Niche! Inc. 1997-2024   Anvil! "Intelligent Availability®" Platform
legal stuff: All info is provided "As-Is". Do not use anything here unless you are willing and able to take responsibility for your own actions.