~ubuntu-branches/ubuntu/karmic/libgetopt-euclid-perl/karmic

« back to all changes in this revision

Viewing changes to t/fail_unknown_mode.t

  • Committer: Bazaar Package Importer
  • Author(s): Niko Tyni
  • Date: 2006-02-23 22:18:49 UTC
  • Revision ID: james.westby@ubuntu.com-20060223221849-i2zv3bhj0hznztrt
Tags: upstream-0.0.5
ImportĀ upstreamĀ versionĀ 0.0.5

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
use Test::More 'no_plan';
 
2
 
 
3
if (eval { require Getopt::Euclid and Getopt::Euclid->import(':foo'); 1 }) {
 
4
    ok 0 => 'Unexpectedly succeeded';
 
5
}
 
6
else {
 
7
    like $@, qr/Unknown mode \(':foo'\)/ => 'Failed as expected'; 
 
8
}
 
9
 
 
10
if (eval { require Getopt::Euclid and Getopt::Euclid->import(':minimal_keys'); 1 }) {
 
11
    ok 1 => 'Minimal mode accepted';
 
12
}
 
13
else {
 
14
    ok 0 => 'Unexpectedly failed';
 
15
}