This is a live mirror of the Perl 5 development currently hosted at https://github.com/perl/perl5
Math::BigInt v1.74, Math::BigRat v0.14, bignum v0.16
[perl5.git] / lib / bignum / t / option_l.t
CommitLineData
126f3c5f
JH
1#!/usr/bin/perl -w
2
b68b7ab1 3use Test::More;
126f3c5f
JH
4use strict;
5
6BEGIN
7 {
8 $| = 1;
9 chdir 't' if -d 't';
10 unshift @INC, '../lib';
11 plan tests => 12;
12 }
13
14use bignum;
15
16my $rc = eval ('bignum->import( "l" => "foo" );');
b68b7ab1 17is ($@,''); # shouldn't die
126f3c5f 18$rc = eval ('bignum->import( "lib" => "foo" );');
b68b7ab1 19is ($@,''); # ditto
126f3c5f
JH
20
21$rc = eval ('bignum->import( "foo" => "bar" );');
b68b7ab1 22like ($@, 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
26foreach (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