line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#!/usr/bin/perl -w |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# The script tests Arch::Backend functions. |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
37
|
|
6
|
|
|
|
|
|
|
|
7
|
1
|
|
|
1
|
|
1060
|
use FindBin; |
|
1
|
|
|
|
|
1239
|
|
|
1
|
|
|
|
|
137
|
|
8
|
1
|
|
|
1
|
|
1107
|
use lib "$FindBin::Bin/../perllib"; |
|
1
|
|
|
|
|
737
|
|
|
1
|
|
|
|
|
7
|
|
9
|
|
|
|
|
|
|
|
10
|
1
|
|
|
1
|
|
1512
|
use Test::More tests => 17; |
|
1
|
|
|
|
|
35980
|
|
|
1
|
|
|
|
|
12
|
|
11
|
|
|
|
|
|
|
BEGIN { |
12
|
1
|
|
|
1
|
|
597
|
$ENV{ARCH_BACKEND} = $ENV{TLA} = $ENV{BAZ} = ""; |
13
|
1
|
|
|
1
|
|
5
|
use_ok("Arch::Backend", qw( |
|
1
|
|
|
|
|
765
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
133
|
|
14
|
|
|
|
|
|
|
arch_backend arch_backend_name arch_backend_version |
15
|
|
|
|
|
|
|
is_tla is_baz |
16
|
|
|
|
|
|
|
has_archive_setup_cmd |
17
|
|
|
|
|
|
|
has_file_diffs_cmd |
18
|
|
|
|
|
|
|
has_register_archive_name_arg |
19
|
|
|
|
|
|
|
has_tree_version_dir_opt |
20
|
|
|
|
|
|
|
has_tree_id_cmd |
21
|
|
|
|
|
|
|
has_set_tree_version_cmd |
22
|
|
|
|
|
|
|
has_cache_feature |
23
|
|
|
|
|
|
|
get_cache_config |
24
|
|
|
|
|
|
|
has_commit_version_arg |
25
|
|
|
|
|
|
|
has_commit_files_separator |
26
|
|
|
|
|
|
|
)); |
27
|
|
|
|
|
|
|
} |
28
|
|
|
|
|
|
|
|
29
|
1
|
|
|
|
|
8
|
is(arch_backend(), "tla", "check default arch_backend"); |
30
|
1
|
50
|
|
|
|
549
|
my $exe = -x "/usr/bin/true"? "/usr/bin/true": "/bin/true"; |
31
|
1
|
|
|
|
|
6
|
is(arch_backend($exe), $exe, "set arch_backend to $exe"); |
32
|
|
|
|
|
|
|
|
33
|
1
|
|
|
|
|
293
|
$ENV{ARCH_PERL_QUIET} = 1; |
34
|
1
|
|
|
|
|
8
|
is(arch_backend_name(), "tla", "check arch_backend_name"); |
35
|
1
|
|
|
|
|
577
|
like(arch_backend_version(), qr/^\d+\./, "check arch_backend_version"); |
36
|
1
|
|
|
|
|
299
|
ok(is_tla(), "check is_tla"); |
37
|
1
|
|
|
|
|
407
|
ok(!is_baz(), "check is_baz"); |
38
|
|
|
|
|
|
|
|
39
|
1
|
|
|
|
|
346
|
ok(has_archive_setup_cmd(), "check has_archive_setup_cmd"); |
40
|
1
|
|
|
|
|
278
|
ok(!has_file_diffs_cmd(), "check has_file_diffs_cmd"); |
41
|
1
|
|
|
|
|
399
|
ok(has_register_archive_name_arg(), "check has_register_archive_name_arg"); |
42
|
|
|
|
|
|
|
|
43
|
1
|
|
|
|
|
300
|
ok(!has_tree_version_dir_opt(), "check has_tree_version_dir_opt"); |
44
|
1
|
|
|
|
|
427
|
ok(!has_tree_id_cmd(), "check has_tree_id_cmd"); |
45
|
1
|
|
|
|
|
288
|
ok(has_set_tree_version_cmd(), "check has_set_tree_version_cmd"); |
46
|
|
|
|
|
|
|
|
47
|
1
|
|
|
|
|
256
|
ok(!has_cache_feature(), "check has_cache_feature"); |
48
|
1
|
|
|
|
|
268
|
is_deeply(get_cache_config(), { dir => undef }, "check get_cache_config"); |
49
|
|
|
|
|
|
|
|
50
|
1
|
|
|
|
|
597
|
ok(has_commit_version_arg(), "check has_commit_version_arg"); |
51
|
1
|
|
|
|
|
237
|
ok(has_commit_files_separator(), "check has_commit_files_separator"); |