Commit f6de1eb1 authored by Yadd's avatar Yadd

New extra tests

parent 888cc760
......@@ -171,7 +171,7 @@ manager: manager_conf
@touch manager
test: common handler portal manager common_test handler_test portal_test manager_test
test: common_test handler_test portal_test manager_test extra_test
common_test: common
......@@ -185,6 +185,9 @@ portal_test: portal handler_test common_test
manager_test: manager handler_test common_test
@$(MAKE) -C ${SRCMANAGERDIR} test FULLPERL="$(PERL) -I../${SRCCOMMONDIR}/blib/lib/ -I../${SRCHANDLERDIR}/blib/lib/"
extra_test: common handler portal manager
PERL_DL_NONLAZY=1 $(PERL) "-MExtUtils::Command::MM" "-e" "test_harness(0, 'lemonldap-ng-common/blib/lib', 'lemonldap-ng-handler/blib/lib', 'lemonldap-ng-manager/blib/lib', 'lemonldap-ng-portal/blib/lib')" extra-tests/*.t
use strict;
use Test::More tests => 6;
use_ok( 'Lemonldap::NG::Portal::Simple' );
ok(open(F, 'lemonldap-ng-portal/blib/lib/Lemonldap/NG/Portal/'));
my (%h1,%h2,@missingInStatus,@differentValues);
# Load constants
$h1{$1} = $2 if(/^\s*PE_(\w+)\s*=>\s*(-?\d+),$/);
last if(/^sub/);
close F;
ok(open(F, 'lemonldap-ng-handler/blib/lib/Lemonldap/NG/Handler/'));
$h2{$2} = $1 if(/^\s*(-?\d+)\s*=>\s*'PORTAL_(\w+)',$/);
foreach my $k(sort keys %h1) {
unless($h1{$k} == $h2{$k}){
push @differentValues,$k;
delete $h2{$k};
else {
push @missingInStatus,$k;
delete $h1{$k};
ok(!@differentValues,'Search different constant values between and portal');
ok(!@missingInStatus,join(', ','Search missing constants in',@missingInStatus));
ok(!(keys %h2), 'Constants set in and not in portal');
Markdown is supported
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