# Sunnyvale, CA 94086, USA, or: http://www.zmanda.com
use Test::More tests => 19;
+use strict;
+use warnings;
use lib "@amperldir@";
use Installcheck::Config;
or BAIL_OUT("device error");
my $tlf = Amanda::Config::config_dir_relative(getconf($CNF_TAPELIST));
-my $tl = Amanda::Tapelist::read_tapelist($tlf);
+my $tl = Amanda::Tapelist->new($tlf, 1);
$tl->add_tapelabel("0", "TESTCONF13", "test tape");
$tl->write($tlf);
qr/Writing label 'TESTCONF92'/,
"amlabel labels the current slot by default");
-$tl = Amanda::Tapelist::read_tapelist($tlf);
-is_deeply($tl->[0], {
+$tl->reload();
+is_deeply($tl->{'tles'}->[0], {
'reuse' => 1,
'comment' => undef,
'position' => 1,