+
+ok(run('amlabel', 'TESTCONF', 'TESTCONF88', '--meta', 'meta-01', '--barcode', 'bar-01', '--assign'),
+ "--assign works");
+
+$tl->reload();
+is_deeply($tl->{'tles'}->[0], {
+ 'reuse' => 1,
+ 'barcode' => 'bar-01',
+ 'meta' => 'meta-01',
+ 'blocksize' => undef,
+ 'comment' => undef,
+ 'position' => 1,
+ 'label' => 'TESTCONF88',
+ 'datestamp' => '0'
+ },
+ "tapelist correctly updated after --assign");
+
+ok(run('amlabel', 'TESTCONF', 'slot', '4'),
+ "amlabel works without a label");
+like($Installcheck::Run::stdout,
+ qr/Reading label\.\.\.
+Found an empty tape\.
+Writing label 'TESTCONF01'\.\.\.
+Checking label\.\.\.
+Success!/,
+ "amlabel without label use autolabel");
+
+$tl->reload();
+is_deeply($tl->{'tles'}->[0], {
+ 'reuse' => 1,
+ 'barcode' => undef,
+ 'meta' => 'meta-01',
+ 'blocksize' => '32',
+ 'comment' => undef,
+ 'position' => 1,
+ 'label' => 'TESTCONF01',
+ 'datestamp' => '0'
+ },
+ "tapelist correctly updated after autolabel");
+