File: 15_compat.t

package info (click to toggle)
libarchive-ar-perl 2.02-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 160 kB
  • ctags: 36
  • sloc: perl: 421; makefile: 2
file content (21 lines) | stat: -rw-r--r-- 400 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
use strict;
use warnings;

use Test::More tests => 5;

use Archive::Ar;

my $ar;

can_ok 'Archive::Ar', 'DEBUG';

$ar = Archive::Ar->new();
is $ar->get_opt('warn'), 0, 'warn off by default';

$ar->DEBUG();
is $ar->get_opt('warn'), 1, 'DEBUG method sets warn';

eval { $ar = Archive::Ar->new(undef, 1) };
is $@, '', 'debug option to new';

is $ar->get_opt('warn'), 1, 'debug option to new sets warn';