Commit | Line | Data |
---|---|---|
126f3c5f JH |
1 | #!/usr/bin/perl -w |
2 | ||
b68b7ab1 | 3 | use Test::More; |
126f3c5f JH |
4 | use strict; |
5 | ||
6 | BEGIN | |
7 | { | |
8 | $| = 1; | |
9 | chdir 't' if -d 't'; | |
10 | unshift @INC, '../lib'; | |
11 | plan tests => 12; | |
12 | } | |
13 | ||
14 | use bignum; | |
15 | ||
16 | my $rc = eval ('bignum->import( "l" => "foo" );'); | |
b68b7ab1 | 17 | is ($@,''); # shouldn't die |
126f3c5f | 18 | $rc = eval ('bignum->import( "lib" => "foo" );'); |
b68b7ab1 | 19 | is ($@,''); # ditto |
126f3c5f JH |
20 | |
21 | $rc = eval ('bignum->import( "foo" => "bar" );'); | |
b68b7ab1 | 22 | like ($@, qr/^Unknown option foo/i, 'died'); # should die |
126f3c5f JH |
23 | |
24 | # test that options are only lowercase (don't see a reason why allow UPPER) | |
25 | ||
26 | foreach (qw/L LIB Lib T Trace TRACE V Version VERSION/) | |
27 | { | |
28 | $rc = eval ('bignum->import( "$_" => "bar" );'); | |
b68b7ab1 | 29 | like ($@, qr/^Unknown option $_/i, 'died'); # should die |
126f3c5f JH |
30 | } |
31 |