File: 01.options.t

package info (click to toggle)
perlbrew 0.78-1%2Bdeb9u1
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 708 kB
  • sloc: perl: 6,291; makefile: 6
file content (35 lines) | stat: -rw-r--r-- 1,062 bytes parent folder | download | duplicates (6)
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 strict;
use Test::More tests => 12;

use App::perlbrew;

my $app = App::perlbrew->new('install', '-n', 'perl-5.12.1',
    '-Dusethreads', '-DDEBUGGING', '-Uusemymalloc', '-Accflags');

note explain($app)
    if (main->can('note') && main->can('explain'));

is join(' ', $app->args), join(' ', qw(install perl-5.12.1));

is_deeply $app->{D}, [qw(usethreads DEBUGGING)], '-D';
is_deeply $app->{U}, [qw(usemymalloc)],          '-U';
is_deeply $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 explain($app)
    if (main->can('note') && main->can('explain'));

is join(' ', $app->args), join(' ', qw(install perl-5.12.1));

is_deeply $app->{D}, [qw(usethreads DEBUGGING)], '-D';
is_deeply $app->{U}, [qw(usemymalloc)],          '-U';
is_deeply $app->{A}, [qw(ccflags)],              '-A';

ok $app->{quiet},  'quiet';
ok !$app->{notest}, 'notest';