~ubuntu-branches/ubuntu/utopic/octopussy/utopic

« back to all changes in this revision

Viewing changes to t/Octopussy_Alert.t

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2012-09-25 10:27:37 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20120925102737-1hgntjl557w3sjqh
Tags: 1.0.6-0ubuntu1
* New upstream release (LP: #1056016).
* d/control: bumped Standards-Version: 3.9.3, no changes.
* d/{copyright,control}: Updated upstream URL.
* d/README.Debian: Fixed minor typo.

Show diffs side-by-side

added added

removed removed

Lines of Context:
15
15
use Readonly;
16
16
 
17
17
use File::Path;
18
 
use Test::More tests => 6;
 
18
use Test::More tests => 13;
19
19
 
20
20
use FindBin;
21
21
use lib "$FindBin::Bin/../usr/share/perl5";
85
85
Octopussy::Alert::Remove($name);
86
86
ok(NOT_NULL($file) && !-f $file, 'Octopussy::Alert::Remove()');
87
87
 
 
88
my $is_valid = Octopussy::Alert::Valid_Name(undef);
 
89
ok(!$is_valid, 'Octopussy::Alert::Valid_Name(undef)');
 
90
 
 
91
$is_valid = Octopussy::Alert::Valid_Name('alert with space');
 
92
ok(!$is_valid, "Octopussy::Alert::Valid_Name('alert with space')");
 
93
 
 
94
$is_valid = Octopussy::Alert::Valid_Name('valid-alert');
 
95
ok($is_valid, "Octopussy::Alert::Valid_Name('valid-alert')");
 
96
 
 
97
$is_valid = Octopussy::Alert::Valid_Name('valid_alert');
 
98
ok($is_valid, "Octopussy::Alert::Valid_Name('valid_alert')");
 
99
 
 
100
$is_valid = Octopussy::Alert::Valid_Status_Name(undef);
 
101
ok(!$is_valid, 'Octopussy::Alert::Valid_Status_Name(undef)');
 
102
 
 
103
$is_valid = Octopussy::Alert::Valid_Status_Name('invalid_status');
 
104
ok(!$is_valid, "Octopussy::Alert::Valid_Status_Name('invalid_status')");
 
105
 
 
106
$is_valid = Octopussy::Alert::Valid_Status_Name('Opened');
 
107
ok($is_valid, "Octopussy::Alert::Valid_Status_Name('Opened')");
 
108
 
88
109
# Clean stuff
89
110
rmtree $DIR_ALERTS;
90
111