Revision 112ce885
Von Bernd Bleßmann vor 10 Monaten hinzugefügt
t/rdbo_consistency.t | ||
---|---|---|
my %metasetup_content = map { ($_ => scalar(read_file("SL/DB/MetaSetup/$_"))) } @metasetups;
|
||
my %db_content = map { ($_ => scalar(read_file("SL/DB/$_"))) } @dbs;
|
||
my $all_content = read_file('SL/DB/Helper/ALL.pm');
|
||
my $all_auth_content = read_file('SL/DB/Helper/ALLAuth.pm');
|
||
my $mapping_content = read_file('SL/DB/Helper/Mappings.pm');
|
||
|
||
sub test_db_has_metasetup {
|
||
... | ... | |
}
|
||
}
|
||
|
||
sub test_auth_db_included_in_all_auth {
|
||
foreach my $pm (grep { m{^Auth} } @dbs) {
|
||
my $base = basename($pm, '.pm');
|
||
ok($all_auth_content =~ m/\nuse\s+SL::DB::${base};/, "$pm has entry in SL::DB::Helper::ALLAuth");
|
||
}
|
||
}
|
||
|
||
sub test_use_in_all_exists_as_db {
|
||
foreach my $package (map { m/^use\s+(.+?);/; $1 } grep { '^use SL::DB::' } split m/\n/, $all_content) {
|
||
next unless $package;
|
||
... | ... | |
test_db_has_metasetup();
|
||
test_metasetup_has_db();
|
||
test_db_included_in_all();
|
||
test_auth_db_included_in_all_auth();
|
||
test_use_in_all_exists_as_db();
|
||
test_metasetup_has_table_to_class_mapping();
|
||
test_db_contains_meta_initialize();
|
Auch abrufbar als: Unified diff
Unit-Test Konsistenz SL/DB/Auth*.pm => Helfer ALLAuth