File: 55_write.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 (19 lines) | stat: -rw-r--r-- 387 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
use strict;
use warnings;

use Test::More tests => 2;
use strict;

use Archive::Ar;

my $ar;

$ar = Archive::Ar->new();
$ar->add_data("test.txt", "here\n");
my $content = $ar->write();
ok length($content) == 74, 'odd size archive padded';

$ar = new Archive::Ar();
$ar->add_data("test.txt", "here1\n");
$content = $ar->write();
ok length($content) == 74, 'even size archive not padded';