Test::MetaSyntactic - Common tests for Acme::MetaSyntactic themes
# add this as t/meta.t use Test::MetaSyntatic; all_themes_ok();
This module provides the minimum set of tests that any Acme::MetaSyntactic theme should pass.
The goal is to make is easier for theme creators build a distribution and ensure theirs themes will work as expected when installed.
Will find all themes under the directories listed in @lib, and run theme_ok() on them.
@lib
theme_ok()
@lib is optional (it will try to find themes in blib/lib or lib if not provided).
Will run all tests on the given $theme. Some tests require access to the source, but they will be skipped if $source is not provided.
$theme
$source
If the subtest_load() test fails, no further test will be run.
subtest_load()
The individual tests are run as subtests. All substests but subtest_load() assume that the module can be successfully loaded.
Checks that the theme source file does not contain the word "FIXME".
Tries to load the theme module.
Checks that the theme has a $VERSION.
$VERSION
Checks that each metasyntactic name in the theme is a valid Perl variable name.
Checks that each name appears once in the theme.
Checks that each name in the theme has valid length.
Checks that the __DATA__ section (if any) of the theme source is properly formatted.
__DATA__
Checks that the exported meta$theme function returns an item from $theme.
meta$theme
Checks that use Acme::MetaSyntactic::$theme () does not export the meta$theme function.
use Acme::MetaSyntactic::$theme ()
Checks that the theme() function returns the theme name.
theme()
For themes with a remote list, checks that the remote list (if any) is identical to the current list of items in the theme.
This subtest will only be run if AUTHOR_TESTING is true and AUTOMATED_TESTING is false. Requires LWP::Simple.
AUTHOR_TESTING
AUTOMATED_TESTING
Philippe Bruhat (BooK), <book@cpan.org>
<book@cpan.org>
Copyright 2012 Philippe Bruhat (BooK), All Rights Reserved.
This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
To install Acme::MetaSyntactic, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Acme::MetaSyntactic
CPAN shell
perl -MCPAN -e shell install Acme::MetaSyntactic
For more information on module installation, please visit the detailed CPAN module installation guide.