File: 65_gnu.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 (24 lines) | stat: -rw-r--r-- 538 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
23
24
use strict;
use warnings;

use Test::More tests => 3;

use Archive::Ar qw(GNU);

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

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

__DATA__
!<arch>
//                                              22        `
verylongfilename.txt/
foo.txt/        1396584498  1000  1000  100644  16        `
contents of foo
/0              1396584491  1000  1000  100644  29        `
contents of verylongfilename