X-Git-Url: https://git.gag.com/?a=blobdiff_plain;ds=sidebyside;f=installcheck%2Famtape.pl;h=3f2f63aaa39e4afb9d752a879a1db0c40b66fb7a;hb=d28952249e392eb31bc8eecc53f6c477f30c617b;hp=51ea4842d3e50d4fb984281ee56d28cebe8f024b;hpb=b116e9366c7b2ea2c2eb53b0a13df4090e176235;p=debian%2Famanda diff --git a/installcheck/amtape.pl b/installcheck/amtape.pl index 51ea484..3f2f63a 100644 --- a/installcheck/amtape.pl +++ b/installcheck/amtape.pl @@ -1,8 +1,9 @@ -# Copyright (c) 2009, 2010 Zmanda, Inc. All Rights Reserved. +# Copyright (c) 2009-2012 Zmanda, Inc. All Rights Reserved. # -# This program is free software; you can redistribute it and/or modify it -# under the terms of the GNU General Public License version 2 as published -# by the Free Software Foundation. +# This program is free software; you can redistribute it and/or +# modify it under the terms of the GNU General Public License +# as published by the Free Software Foundation; either version 2 +# of the License, or (at your option) any later version. # # This program is distributed in the hope that it will be useful, but # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY @@ -16,7 +17,7 @@ # 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; @@ -148,13 +149,26 @@ ok(run('amtape', 'TESTCONF', 'show'), "'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 @@ -215,13 +229,13 @@ like($Installcheck::Run::stderr, 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();