D64-Disk-Dir-Item
view release on metacpan or search on metacpan
my $expected_string = join '', map { chr hex } qw(44 45 4c);
is($string, $expected_string, 'convert $T_DEL file type into "del" PETSCII string');
}
########################################
{
my $string = $class->type_to_string($T_SEQ, 1);
my $expected_string = join '', map { chr hex } qw(53 45 51);
is($string, $expected_string, 'convert $T_SEQ file type into "seq" PETSCII string');
}
########################################
{
my $string = $class->type_to_string($T_PRG, 1);
my $expected_string = join '', map { chr hex } qw(50 52 47);
is($string, $expected_string, 'convert $T_PRG file type into "prg" PETSCII string');
}
########################################
{
my $string = $class->type_to_string($T_USR, 1);
my $expected_string = join '', map { chr hex } qw(55 53 52);
is($string, $expected_string, 'convert $T_USR file type into "usr" PETSCII string');
}
########################################
{
my $string = $class->type_to_string($T_REL, 1);
my $expected_string = join '', map { chr hex } qw(52 45 4c);
is($string, $expected_string, 'convert $T_REL file type into "rel" PETSCII string');
}
########################################
{
my $string = $class->type_to_string($T_CBM, 1);
my $expected_string = join '', map { chr hex } qw(43 42 4d);
is($string, $expected_string, 'convert $T_CBM file type into "cbm" PETSCII string');
}
########################################
{
my $string = $class->type_to_string($T_DIR, 1);
my $expected_string = join '', map { chr hex } qw(44 49 52);
is($string, $expected_string, 'convert $T_DIR file type into "dir" PETSCII string');
}
########################################
{
my $string = $class->type_to_string(0xf0, 1);
my $expected_string = join '', map { chr hex } qw(3f 3f 3f);
is($string, $expected_string, 'convert invalid file type into "???" PETSCII string');
}
########################################
{
my $item = $class->new();
my $is_closed = $item->closed();
ok(!$is_closed, 'get closed flag from an empty directory item');
}
########################################
{
my $item = get_item();
my $is_closed = $item->closed();
ok($is_closed, 'get closed flag from a valid directory item');
}
########################################
{
my $item = $class->new();
my $is_locked = $item->locked();
ok(!$is_locked, 'get locked flag from an empty directory item');
}
########################################
{
my $item = get_item();
my $is_locked = $item->locked();
ok(!$is_locked, 'get locked flag from a valid directory item');
}
########################################
{
my $item = $class->new();
my $track = $item->track();
is($track, 0x00, 'get track location of first sector of file from an empty directory item');
}
########################################
{
my $item = get_item();
my $track = $item->track();
is($track, 0x11, 'get track location of first sector of file from a valid directory item');
}
########################################
{
my $item = $class->new();
my $sector = $item->sector();
is($sector, 0x00, 'get sector location of first sector of file from an empty directory item');
}
########################################
{
my $item = get_item();
my $sector = $item->sector();
is($sector, 0x00, 'get sector location of first sector of file from a valid directory item');
}
########################################
{
my $item = $class->new();
$item->type($T_REL);
my $side_track = $item->side_track();
is($side_track, 0x00, 'get track location of first side-sector block from an empty relative file item');
}
########################################
{
my $item = get_item();
$item->type($T_REL);
my $side_track = $item->side_track();
is($side_track, 0x00, 'get track location of first side-sector block from a valid relative file item');
}
########################################
{
my $item = get_item();
my $side_track = $item->side_track();
is($side_track, undef, 'get track location of first side-sector block from a valid program file item');
}
########################################
{
my $item = $class->new();
$item->type($T_REL);
my $side_sector = $item->side_sector();
is($side_sector, 0x00, 'get sector location of first side-sector block from an empty relative file item');
}
########################################
{
my $item = get_item();
$item->type($T_REL);
my $side_sector = $item->side_sector();
is($side_sector, 0x00, 'get sector location of first side-sector block from a valid relative file item');
}
########################################
( run in 3.170 seconds using v1.01-cache-2.11-cpan-0b58ddf2af1 )