#17931 checked for wrong constant
[p5sagit/p5-mst-13.2.git] / lib / bignum / t / option_l.t
1 #!/usr/bin/perl -w
2
3 ###############################################################################
4
5 use Test;
6 use strict;
7
8 BEGIN
9   {
10   $| = 1;
11   chdir 't' if -d 't';
12   unshift @INC, '../lib';
13   plan tests => 12;
14   }
15
16 use bignum;
17
18 my $rc = eval ('bignum->import( "l" => "foo" );');
19 ok ($@,'');                                             # shouldn't die
20 $rc = eval ('bignum->import( "lib" => "foo" );');
21 ok ($@,'');                                             # ditto
22
23 $rc = eval ('bignum->import( "foo" => "bar" );');
24 ok ($@ =~ /^Unknown option foo/i,1);                    # should die
25
26 # test that options are only lowercase (don't see a reason why allow UPPER)
27
28 foreach (qw/L LIB Lib T Trace TRACE V Version VERSION/)
29   {
30   $rc = eval ('bignum->import( "$_" => "bar" );');
31   ok ($@ =~ /^Unknown option $_/i,1);                   # should die
32   }
33