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