Verify that all attributes have been checked

This commit is contained in:
Xavier Guimard 2016-01-06 21:33:31 +00:00
parent 4faf8fd749
commit 2acbbf9de6
2 changed files with 10 additions and 3 deletions

File diff suppressed because one or more lines are too long

View File

@ -5,6 +5,7 @@
use strict;
use Test::More;
use Data::Dumper;
my $knownExceptions = qr/^(?:remoteCookieName)$/;
@ -50,14 +51,20 @@ foreach my $t ( values %$tree ) {
foreach ( keys %h2 ) {
s/^\*//;
ok( delete( $h{$_} ), "Leaf $_ exists in attributes" );
ok( defined( $h{$_} ), "Leaf $_ exists in attributes" );
delete $h{$_};
$count++;
}
foreach (@notManagedAttributes) {
ok( delete( $h{$_} ), "Unmanaged attribute '$_' is declared" );
ok( defined( $h{$_} ), "Unmanaged attribute '$_' is declared" );
delete $h{$_};
$count++;
}
ok( !%h, "No remaining attributes" )
or print STDERR Dumper( { 'Remaining attributes' => [ keys %h ] } );
$count++;
done_testing($count);
sub scanTree {