# Contact information: Zmanda Inc, 465 S. Mathilda Ave., Suite 300
# Sunnyvale, CA 94086, USA, or: http://www.zmanda.com
-use Test::More tests => 42;
+use Test::More tests => 46;
use strict;
use warnings;
"'amtape TESTCONF show'");
like($Installcheck::Run::stderr,
qr/slot +2:.*label MyTape\nslot +3/,
- "..result correct");
+ "'amtape TESTCONF show' ..result correct");
+
+ok(run('amtape', 'TESTCONF', 'show', '2'),
+ "'amtape TESTCONF show'");
+like($Installcheck::Run::stderr,
+ qr/^slot +2:.*label MyTape$/,
+ "'amtape TESTCONF show 2' ..result correct");
+
+ok(run('amtape', 'TESTCONF', 'show', '1,3'),
+ "'amtape TESTCONF show'");
+like($Installcheck::Run::stderr,
+ qr/^slot +1: unlabeled volume\nslot +3: date \d{14} label TESTCONF13$/,
+# qr/slot +1: unlabeled volume\nslot +3: date 20111121133419 label TESTCONF13/,
+ "'amtape TESTCONF show 1,3' ..result correct");
ok(run('amtape', 'TESTCONF', 'taper'),
"'amtape TESTCONF taper'");
like($Installcheck::Run::stderr,
- qr/Will write to volume TESTCONF13 in slot 3/,
- "..result correct");
+ qr/Will write to volume 'TESTCONF13' in slot 3/,
+ "'amtape TESTCONF taper' ..result correct");
###
## shift to using the new Amanda::Changer::disk
ok(run('amtape', 'TESTCONF', 'inventory'),
"'amtape TESTCONF inventory'");
like($Installcheck::Run::stdout,
- qr/slot +1: blank\nslot +2: label MyTape\nslot +3/,
+ qr/slot +1: blank\nslot +2: label MyTape \(current\)\nslot +3/,
"..result correct");
ok(run('amtape', 'TESTCONF', 'taper'),
"'amtape TESTCONF taper'");
like($Installcheck::Run::stderr,
- qr/Will write to volume TESTCONF13 in slot 3/,
- "..result correct");
+ qr/Will write to volume 'TESTCONF13' in slot 3/,
+ "'amtape TESTCONF taper' ..result correct");
Installcheck::Run::cleanup();