File: 01.options.t

package info (click to toggle)
perlbrew 1.02-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 752 kB
  • sloc: perl: 9,387; makefile: 7; sh: 1
file content (35 lines) | stat: -rw-r--r-- 923 bytes parent folder | download | duplicates (2)
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;