Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 112ce885

Von Bernd Bleßmann vor 7 Monaten hinzugefügt

  • ID 112ce88593b766f4edd70d6fbe1f862a08ce2e2a
  • Vorgänger 5b3ae1da
  • Nachfolger 83e6790a

Unit-Test Konsistenz SL/DB/Auth*.pm => Helfer ALLAuth

Unterschiede anzeigen:

t/rdbo_consistency.t
25 25
my %metasetup_content = map { ($_ => scalar(read_file("SL/DB/MetaSetup/$_"))) } @metasetups;
26 26
my %db_content        = map { ($_ => scalar(read_file("SL/DB/$_")))           } @dbs;
27 27
my $all_content       = read_file('SL/DB/Helper/ALL.pm');
28
my $all_auth_content  = read_file('SL/DB/Helper/ALLAuth.pm');
28 29
my $mapping_content   = read_file('SL/DB/Helper/Mappings.pm');
29 30

  
30 31
sub test_db_has_metasetup {
......
48 49
  }
49 50
}
50 51

  
52
sub test_auth_db_included_in_all_auth {
53
  foreach my $pm (grep { m{^Auth} } @dbs) {
54
    my $base = basename($pm, '.pm');
55
    ok($all_auth_content =~ m/\nuse\s+SL::DB::${base};/, "$pm has entry in SL::DB::Helper::ALLAuth");
56
  }
57
}
58

  
51 59
sub test_use_in_all_exists_as_db {
52 60
  foreach my $package (map { m/^use\s+(.+?);/; $1 } grep { '^use SL::DB::' } split m/\n/, $all_content) {
53 61
    next unless $package;
......
88 96
test_db_has_metasetup();
89 97
test_metasetup_has_db();
90 98
test_db_included_in_all();
99
test_auth_db_included_in_all_auth();
91 100
test_use_in_all_exists_as_db();
92 101
test_metasetup_has_table_to_class_mapping();
93 102
test_db_contains_meta_initialize();

Auch abrufbar als: Unified diff