| 1 |
# |
| 2 |
# This file is part of the LibreOffice project. |
| 3 |
# |
| 4 |
# This Source Code Form is subject to the terms of the Mozilla Public |
| 5 |
# License, v. 2.0. If a copy of the MPL was not distributed with this |
| 6 |
# file, You can obtain one at http://mozilla.org/MPL/2.0/. |
| 7 |
# |
| 8 |
|
| 9 |
use strict; |
| 10 |
use warnings; |
| 11 |
|
| 12 |
use lib '.'; |
| 13 |
|
| 14 |
use Test::More; |
| 15 |
|
| 16 |
BEGIN { |
| 17 |
use_ok('installer::packagelist'); |
| 18 |
} |
| 19 |
|
| 20 |
my @packagemodules = ( |
| 21 |
{ allmodules => [qw(a b c d)] }, |
| 22 |
{ allmodules => [qw(a b c)] }, |
| 23 |
{ allmodules => [qw(e f g)] }, |
| 24 |
{ allmodules => [qw(h)] }, |
| 25 |
{ allmodules => [qw(a b g)] }, |
| 26 |
); |
| 27 |
|
| 28 |
my @expected_packagemodules = ( |
| 29 |
{ allmodules => [qw(d)] }, |
| 30 |
{ allmodules => [qw(c)] }, |
| 31 |
{ allmodules => [qw(e f)] }, |
| 32 |
{ allmodules => [qw(h)] }, |
| 33 |
{ allmodules => [qw(a b g)] }, |
| 34 |
); |
| 35 |
|
| 36 |
installer::packagelist::remove_multiple_modules_packages(\@packagemodules); |
| 37 |
|
| 38 |
is_deeply(\@packagemodules, \@expected_packagemodules); |
| 39 |
|
| 40 |
done_testing(); |