-
Notifications
You must be signed in to change notification settings - Fork 220
/
Copy path01.options.t
35 lines (23 loc) · 923 Bytes
/
01.options.t
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#!perl
use Test2::V0;
use Data::Dumper;
use App::perlbrew;
my $app = App::perlbrew->new('install', '-n', 'perl-5.12.1',
'-Dusethreads', '-DDEBUGGING', '-Uusemymalloc', '-Accflags');
note Dumper($app);
is join(' ', $app->args), join(' ', qw(install perl-5.12.1));
is $app->{D}, [qw(usethreads DEBUGGING)], '-D';
is $app->{U}, [qw(usemymalloc)], '-U';
is $app->{A}, [qw(ccflags)], '-A';
ok !$app->{quiet}, 'not quiet';
ok $app->{notest}, 'notest';
$app = App::perlbrew->new('install', '--quiet', 'perl-5.12.1',
'-D', 'usethreads', '-D=DEBUGGING', '-U', 'usemymalloc', '-A', 'ccflags');
note Dumper($app);
is join(' ', $app->args), join(' ', qw(install perl-5.12.1));
is $app->{D}, [qw(usethreads DEBUGGING)], '-D';
is $app->{U}, [qw(usemymalloc)], '-U';
is $app->{A}, [qw(ccflags)], '-A';
ok $app->{quiet}, 'quiet';
ok !$app->{notest}, 'notest';
done_testing;