From a0ce0340d0f95514008cfac751fe58748bbadd88 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Thu, 20 Mar 2008 00:04:16 +0000 Subject: * Switched indent used in Perl-code and settings files from tabs to 4 spaces. May need some manual corrections here and there, but should basically be ok. git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1658 95ad53e4-c205-0410-b2fa-d234c58c8868 --- config-db/t/21-group_system_ref.t | 154 +++++++++++++++++++------------------- 1 file changed, 77 insertions(+), 77 deletions(-) (limited to 'config-db/t/21-group_system_ref.t') diff --git a/config-db/t/21-group_system_ref.t b/config-db/t/21-group_system_ref.t index 6f92a8dd..b643f7e0 100644 --- a/config-db/t/21-group_system_ref.t +++ b/config-db/t/21-group_system_ref.t @@ -24,172 +24,172 @@ my $system1 = shift @systems; my $system3 = shift @systems; foreach my $group ($group1, $group3) { - is( - my @systemIDs = $configDB->fetchSystemIDsOfGroup($group->{id}), - 0, "group $group->{id} has no system-IDs yet" - ); + is( + my @systemIDs = $configDB->fetchSystemIDsOfGroup($group->{id}), + 0, "group $group->{id} has no system-IDs yet" + ); } foreach my $system ($defaultSystem, $system1, $system3) { - is( - my @groupIDs = $configDB->fetchGroupIDsOfSystem($system->{id}), - 0, "system $system->{id} has no group-IDs yet" - ); + is( + my @groupIDs = $configDB->fetchGroupIDsOfSystem($system->{id}), + 0, "system $system->{id} has no group-IDs yet" + ); } ok( - $configDB->addSystemIDsToGroup(1, [3]), - 'system-ID 3 has been associated to group 1' + $configDB->addSystemIDsToGroup(1, [3]), + 'system-ID 3 has been associated to group 1' ); is( - my @systemIDs = sort($configDB->fetchSystemIDsOfGroup(1)), - 1, "group 1 should have one system-ID" + my @systemIDs = sort($configDB->fetchSystemIDsOfGroup(1)), + 1, "group 1 should have one system-ID" ); is($systemIDs[0], 3, "first system of group 1 should have ID 3"); is( - @systemIDs = sort($configDB->fetchSystemIDsOfGroup(3)), - 0, "group 3 should have no system-ID" + @systemIDs = sort($configDB->fetchSystemIDsOfGroup(3)), + 0, "group 3 should have no system-ID" ); is( - my @groupIDs = sort($configDB->fetchGroupIDsOfSystem(0)), - 0, "default system should have no group-IDs" + my @groupIDs = sort($configDB->fetchGroupIDsOfSystem(0)), + 0, "default system should have no group-IDs" ); is( - @groupIDs = sort($configDB->fetchGroupIDsOfSystem(1)), - 0, "system 1 should have no group-IDs" + @groupIDs = sort($configDB->fetchGroupIDsOfSystem(1)), + 0, "system 1 should have no group-IDs" ); is( - @groupIDs = sort($configDB->fetchGroupIDsOfSystem(3)), - 1, "system 3 should have one group-ID" + @groupIDs = sort($configDB->fetchGroupIDsOfSystem(3)), + 1, "system 3 should have one group-ID" ); is($groupIDs[0], 1, "first group of system 3 should have ID 1"); ok( - $configDB->addSystemIDsToGroup(3, [1,3,3,1,3]), - 'system-IDs 1 and 3 have been associated to group 3' + $configDB->addSystemIDsToGroup(3, [1,3,3,1,3]), + 'system-IDs 1 and 3 have been associated to group 3' ); is( - @systemIDs = sort($configDB->fetchSystemIDsOfGroup(1)), - 1, "group 1 should have one system-ID" + @systemIDs = sort($configDB->fetchSystemIDsOfGroup(1)), + 1, "group 1 should have one system-ID" ); is($systemIDs[0], 3, "first system of group 1 should have ID 3"); is( - @systemIDs = sort($configDB->fetchSystemIDsOfGroup(3)), - 2, "group 3 should have two system-IDs" + @systemIDs = sort($configDB->fetchSystemIDsOfGroup(3)), + 2, "group 3 should have two system-IDs" ); is($systemIDs[0], 1, "first system of group 3 should have ID 1"); is($systemIDs[1], 3, "second system of group 3 should have ID 3"); is( - @groupIDs = sort($configDB->fetchGroupIDsOfSystem(0)), - 0, "default system should have no group-ID" + @groupIDs = sort($configDB->fetchGroupIDsOfSystem(0)), + 0, "default system should have no group-ID" ); is( - @groupIDs = sort($configDB->fetchGroupIDsOfSystem(1)), - 1, "system 1 should have one group-ID" + @groupIDs = sort($configDB->fetchGroupIDsOfSystem(1)), + 1, "system 1 should have one group-ID" ); is($groupIDs[0], 3, "first group of system 1 should have ID 3"); is( - @groupIDs = sort($configDB->fetchGroupIDsOfSystem(3)), - 2, "system 3 should have two group-IDs" + @groupIDs = sort($configDB->fetchGroupIDsOfSystem(3)), + 2, "system 3 should have two group-IDs" ); is($groupIDs[0], 1, "first group of system 3 should have ID 1"); is($groupIDs[1], 3, "second group of system 3 should have ID 3"); ok( - $configDB->setGroupIDsOfSystem(3, []), - 'group-IDs of system 3 have been set to empty array' + $configDB->setGroupIDsOfSystem(3, []), + 'group-IDs of system 3 have been set to empty array' ); is( - @groupIDs = sort($configDB->fetchGroupIDsOfSystem(3)), - 0, "system 3 should have no group-IDs" + @groupIDs = sort($configDB->fetchGroupIDsOfSystem(3)), + 0, "system 3 should have no group-IDs" ); is( - @systemIDs = sort($configDB->fetchSystemIDsOfGroup(1)), - 0, "group 1 should have no more system-IDs" + @systemIDs = sort($configDB->fetchSystemIDsOfGroup(1)), + 0, "group 1 should have no more system-IDs" ); is( - @systemIDs = sort($configDB->fetchSystemIDsOfGroup(3)), - 1, "group 3 should have one system-ID" + @systemIDs = sort($configDB->fetchSystemIDsOfGroup(3)), + 1, "group 3 should have one system-ID" ); is($systemIDs[0], 1, "first system of group 3 should have ID 1"); ok( - $configDB->addSystemIDsToGroup(1, [0]), - 'associating the default system should have no effect' + $configDB->addSystemIDsToGroup(1, [0]), + 'associating the default system should have no effect' ); is( - @systemIDs = sort($configDB->fetchSystemIDsOfGroup(1)), - 0, "group 1 should still have no system-ID" + @systemIDs = sort($configDB->fetchSystemIDsOfGroup(1)), + 0, "group 1 should still have no system-ID" ); ok( - $configDB->removeGroupIDsFromSystem(1, [1]), - 'removing an unassociated group-ID should have no effect' + $configDB->removeGroupIDsFromSystem(1, [1]), + 'removing an unassociated group-ID should have no effect' ); is( - @groupIDs = sort($configDB->fetchGroupIDsOfSystem(1)), - 1, "system 1 should have one group-ID" + @groupIDs = sort($configDB->fetchGroupIDsOfSystem(1)), + 1, "system 1 should have one group-ID" ); ok( - $configDB->removeGroupIDsFromSystem(1, [3]), - 'removing an associated group-ID should work' + $configDB->removeGroupIDsFromSystem(1, [3]), + 'removing an associated group-ID should work' ); is( - @groupIDs = sort($configDB->fetchGroupIDsOfSystem(1)), - 0, "system 1 should have no more group-ID" + @groupIDs = sort($configDB->fetchGroupIDsOfSystem(1)), + 0, "system 1 should have no more group-ID" ); $configDB->addSystem({ - 'name' => 'sys-5', - 'export_id' => 1, - 'comment' => 'shortlived', + 'name' => 'sys-5', + 'export_id' => 1, + 'comment' => 'shortlived', }); ok( - $configDB->addGroupIDsToSystem(5, [3]), - 'default group has been associated to system 5' + $configDB->addGroupIDsToSystem(5, [3]), + 'default group has been associated to system 5' ); is( - @systemIDs = sort($configDB->fetchSystemIDsOfGroup(1)), - 0, "group 1 should have no system-ID" + @systemIDs = sort($configDB->fetchSystemIDsOfGroup(1)), + 0, "group 1 should have no system-ID" ); is( - @systemIDs = sort($configDB->fetchSystemIDsOfGroup(3)), - 1, "group 3 should have no system-ID" + @systemIDs = sort($configDB->fetchSystemIDsOfGroup(3)), + 1, "group 3 should have no system-ID" ); is($systemIDs[0], 5, "first system of group 3 should have ID 5"); is( - @groupIDs = sort($configDB->fetchGroupIDsOfSystem(0)), - 0, "default system should have no group-IDs" + @groupIDs = sort($configDB->fetchGroupIDsOfSystem(0)), + 0, "default system should have no group-IDs" ); is( - @groupIDs = sort($configDB->fetchGroupIDsOfSystem(1)), - 0, "system 1 should have no group-ID" + @groupIDs = sort($configDB->fetchGroupIDsOfSystem(1)), + 0, "system 1 should have no group-ID" ); is( - @groupIDs = sort($configDB->fetchGroupIDsOfSystem(3)), - 0, "system 3 should have no group-IDs" + @groupIDs = sort($configDB->fetchGroupIDsOfSystem(3)), + 0, "system 3 should have no group-IDs" ); is( - @groupIDs = sort($configDB->fetchGroupIDsOfSystem(5)), - 1, "system 5 should have one group-ID" + @groupIDs = sort($configDB->fetchGroupIDsOfSystem(5)), + 1, "system 5 should have one group-ID" ); is($groupIDs[0], 3, "first group of system 5 should have ID 3"); ok( - $configDB->removeSystemIDsFromGroup(3, [6]), - 'removing an unassociated system-ID should have no effect' + $configDB->removeSystemIDsFromGroup(3, [6]), + 'removing an unassociated system-ID should have no effect' ); is( - @groupIDs = sort($configDB->fetchSystemIDsOfGroup(3)), - 1, "group 3 should have one system-ID" + @groupIDs = sort($configDB->fetchSystemIDsOfGroup(3)), + 1, "group 3 should have one system-ID" ); ok( - $configDB->removeSystem(5), - 'removing a system should drop group associations, too' + $configDB->removeSystem(5), + 'removing a system should drop group associations, too' ); is( - @groupIDs = sort($configDB->fetchSystemIDsOfGroup(3)), - 0, "group 3 should have no more system-ID" + @groupIDs = sort($configDB->fetchSystemIDsOfGroup(3)), + 0, "group 3 should have no more system-ID" ); $configDB->disconnect(); -- cgit v1.2.3-55-g7522