fix syntax error, add basic tests
This commit is contained in:
parent
45b84ec93f
commit
7067afe8a9
2 changed files with 16 additions and 1 deletions
|
|
@ -76,7 +76,7 @@ sub preloadPaths {
|
|||
my @paths;
|
||||
try {
|
||||
@paths = grep {
|
||||
-d ? 1 : do {
|
||||
(-d) ? 1 : do {
|
||||
warn "WARNING: Not adding lib directory '$path' from @{[PRELOAD_CUSTOM]}: Directory does not exist.\n";
|
||||
0;
|
||||
}
|
||||
|
|
|
|||
15
t/Paths.t
Normal file
15
t/Paths.t
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
use 5.010;
|
||||
use strict;
|
||||
use warnings;
|
||||
|
||||
use Test::More tests => 2; # last test to print
|
||||
use WebGUI::Paths;
|
||||
|
||||
can_ok 'WebGUI::Paths', qw(CONFIG_BASE LOG_CONFIG SPECTRE_CONFIG UPGRADES_PATH PRELOAD_CUSTOM PRELOAD_EXCLUSIONS EXTRAS DEFAULT_UPLOADS DEFAULT_SQL);
|
||||
ok !(grep { WebGUI::Paths->can($_) }
|
||||
qw(croak realpath catdir splitpath catpath splitpath updir catfile try catch _readTextLines)),
|
||||
'Internal functions cleaned up';
|
||||
|
||||
my @configs = WebGUI::Paths->siteConfigs;
|
||||
ok !(\@configs ~~ WebGUI::Paths->SPECTRE_CONFIG), 'Spectre config not listed in configs';
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue