File: 11_DEFALT_ERROR_1.t

package info (click to toggle)
libgetopt-ex-hashed-perl 1.0601-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 312 kB
  • sloc: perl: 408; makefile: 2
file content (30 lines) | stat: -rw-r--r-- 489 bytes parent folder | download
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
use strict;
use warnings;
use Test::More;
use lib './t';

my @argv = qw(
    --string Alice
    Life
    --number 42
    --list mostly --list harmless
    Universe and
    --hash animal=dolphin --hash fish=babel
    --implicit
    -s -42
    --end 999
    --beeblebrox
    --so-long
    --both 99
    Everything
    );

BEGIN {
    no warnings 'once';
    $App::Foo::ACCESSOR_DEFAULT_ERROR1 = 1;
}

eval q{ use App::Foo };
like($@, qr/must be arrayref/, "DEFAULT ERROR 1");

done_testing;