xref: /onnv-gate/usr/src/cmd/perl/5.8.4/distrib/lib/bignum/t/option_l.t (revision 0:68f95e015346)
1#!/usr/bin/perl -w
2
3###############################################################################
4
5use Test;
6use strict;
7
8BEGIN
9  {
10  $| = 1;
11  chdir 't' if -d 't';
12  unshift @INC, '../lib';
13  plan tests => 12;
14  }
15
16use bignum;
17
18my $rc = eval ('bignum->import( "l" => "foo" );');
19ok ($@,'');						# shouldn't die
20$rc = eval ('bignum->import( "lib" => "foo" );');
21ok ($@,'');						# ditto
22
23$rc = eval ('bignum->import( "foo" => "bar" );');
24ok ($@ =~ /^Unknown option foo/i,1);			# should die
25
26# test that options are only lowercase (don't see a reason why allow UPPER)
27
28foreach (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
34