Commit a67cc83c authored by Yadd's avatar Yadd
Browse files

Bug in deleted cat (menu / app list) + better debug (#907)

parent 47a19d81
......@@ -391,12 +391,18 @@ sub _scanNodes {
$self->_scanNodes($subNodes) or return 0;
# Check for deleted
my @listCatRef = keys %{ $self->refConf->{applicationList} };
my @listCatRef =
map { $self->refConf->{applicationList}->{$_}->{catname} }
keys %{ $self->refConf->{applicationList} };
my @listCatNew =
map { $self->newConf->{applicationList}->{$_}->{catname} }
keys(
ref $self->newConf->{applicationList}
? $self->newConf->{applicationList}
: {} );
%{
ref $self->newConf->{applicationList}
? $self->newConf->{applicationList}
: {}
}
);
foreach my $cat (@listCatNew) {
@listCatRef = grep { $_ ne $cat } @listCatRef;
}
......
......@@ -36,15 +36,27 @@ while ( my $c = shift @{ $resBody->{details}->{__changes__} } ) {
my $cmp1 = @changes;
my $cmp2 = @cmsg;
my @d1 = grep { $_->{key} eq $c->{key} } @changes;
my @d2 = grep { $_->{key} eq $c->{key} } @cmsg;
@changes = grep { $_->{key} ne $c->{key} } @changes;
@cmsg = grep { $_->{key} ne $c->{key} } @cmsg;
ok( ( $cmp1 - @changes ) == ( $cmp2 - @cmsg ), "$c->{key} found" );
ok( ( $cmp1 - @changes ) == ( $cmp2 - @cmsg ), "$c->{key} found" )
or print STDERR 'Expect: '
. ( $cmp1 - @changes )
. ', got: '
. ( $cmp2 - @cmsg )
. "\nExpect: "
. Dumper( \@d1 ) . "Got: "
. Dumper( \@d2 );
count(1);
}
ok( !@changes, 'All changes detected' ) or $bug = 1;
if ($bug) {
print STDERR Dumper( \@changes, \@cmsg );
print STDERR 'Expected not found: '
. Dumper( \@changes )
. 'Changes announced and not found: '
. Dumper( \@cmsg );
}
#print STDERR Dumper(\@changes,\@cmsg);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment