Debian Codegraph @

solenv/bin/modules/t/installer-setupscript.t

raw
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 Test::More;
13
14 use lib '.';
15
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 ));
29 }
30
31 my @folders = (
32 { gid => '123' },
33 { gid => 'PREDEFINED_FOO' },
34 { gid => 'PREDEFINED_BAR' },
35 );
36
37 my @folderitems = (
38 { FolderID => 'PREDEFINED_AUTOSTART' },
39 { FolderID => 'PREDEFINED_BAR' },
40 { FolderID => '456' },
41 );
42
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 },
52 );
53
54 add_predefined_folder(\@folderitems, \@folders);
55
56 is_deeply(\@folders, \@expected_folders);
57
58 done_testing();