Branch libreoffice-5-0-4
[LibreOffice.git] / solenv / bin / modules / t / installer-setupscript.t
blob2994288e2a399055c483e57e37e3b10e73a0c471
2 # This file is part of the LibreOffice project.
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/.
9 use strict;
10 use warnings;
12 use Test::More;
14 use lib '.';
16 BEGIN {
17     use_ok('installer::setupscript', qw(
18         add_installationobject_to_variables
19         add_lowercase_productname_setupscriptvariable
20         add_predefined_folder
21         get_all_items_from_script
22         get_all_scriptvariables_from_installation_object
23         prepare_non_advertised_files
24         replace_all_setupscriptvariables_in_script
25         replace_preset_properties
26         resolve_lowercase_productname_setupscriptvariable
27         set_setupscript_name
28     ));
31 my @folders = (
32     { gid => '123' },
33     { gid => 'PREDEFINED_FOO' },
34     { gid => 'PREDEFINED_BAR' },
37 my @folderitems = (
38     { FolderID => 'PREDEFINED_AUTOSTART' },
39     { FolderID => 'PREDEFINED_BAR' },
40     { FolderID => '456' },
43 my @expected_folders = (
44     { gid => '123' },
45     { gid => 'PREDEFINED_FOO' },
46     { gid => 'PREDEFINED_BAR' },
47     {
48       ismultilingual => 0,
49       Name => "",
50       gid => 'PREDEFINED_AUTOSTART'
51     },
54 add_predefined_folder(\@folderitems, \@folders);
56 is_deeply(\@folders, \@expected_folders);
58 done_testing();