File: 70_bsd.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 (22 lines) | stat: -rw-r--r-- 476 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
22
use strict;
use warnings;

use Test::More tests => 3;

use Archive::Ar qw(BSD);

my $content = do {local $/ = undef; <DATA>};

my $ar = Archive::Ar->new();
ok $ar->read_memory($content) or diag $ar->error;
is $ar->type, BSD;
my $regurg = $ar->write;
is $regurg, $content;

__DATA__
!<arch>
foo.txt         1396073800  1000  1000  100644  16        `
contents of foo
#1/20           1396073800  1000  1000  100644  49        `
verylongfilename.txtcontents of verylongfilename