File: 103_uc_bug.t

package info (click to toggle)
libmousex-getopt-perl 0.38-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 364 kB
  • sloc: perl: 1,550; makefile: 2
file content (31 lines) | stat: -rw-r--r-- 600 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
#!/usr/bin/perl

use strict;
use warnings;

use Test::More tests => 3;

{
    package App;
    use Mouse;
    with qw(MouseX::Getopt);

    has 'TrackingNumber' => (
        is  => 'rw',
        isa => 'Str',
    );

    has 'otherparam' => (
        is  => 'rw',
        isa => 'Str',
    );
}

{
    local @ARGV = ('--TrackingNumber','1Z1234567812345670','--otherparam','foo');

    my $app = App->new_with_options;
    isa_ok($app, 'App');
    is($app->TrackingNumber, '1Z1234567812345670', '... TrackingNumber is as expected');
    is($app->otherparam, 'foo', '... otherparam is as expected');
}