Cross Reference: bproto.t
xref
: /
osnet-11
/
usr
/
src
/
cmd
/
perl
/
5.8.4
/
distrib
/
t
/
comp
/
bproto.t
Home
History
Annotate
Line#
Navigate
Download
Search
only in
./
1
N/A
#!./perl
1
N/A
#
1
N/A
# check if builtins behave as prototyped
1
N/A
#
1
N/A
1
N/A
BEGIN
{
1
N/A
chdir
't'
if
-d
't'
;
1
N/A
@
INC
=
'../lib'
;
1
N/A
}
1
N/A
1
N/A
print
"1..10\n"
;
1
N/A
1
N/A
my
$i =
1
;
1
N/A
1
N/A
sub
foo
{}
1
N/A
my
$bar
=
"bar"
;
1
N/A
1
N/A
sub
test_too_many
{
1
N/A
eval
$_[
0
];
1
N/A
print
"not "
unless
$@ =~ /^
Too
many
arguments
/;
1
N/A
printf
"ok %d\n"
,$i++;
1
N/A
}
1
N/A
1
N/A
sub
test_no_error
{
1
N/A
eval
$_[
0
];
1
N/A
print
"not "
if
$@;
1
N/A
printf
"ok %d\n"
,$i++;
1
N/A
}
1
N/A
1
N/A
test_too_many
($_)
for
split
/\n/,
1
N/A
q[
defined
(&
foo
,
$bar
)
;
1
N/A
undef
(&
foo
,
$bar
)
;
1
N/A
uc
(
$bar
,
$bar
)
;
1
N/A
];
1
N/A
1
N/A
test_no_error
($_)
for
split
/\n/,
1
N/A
q[
scalar
(&
foo
,
$bar
)
;
1
N/A
defined
&
foo
, &
foo
, &
foo
;
1
N/A
undef
&
foo
,
$bar
;
1
N/A
uc
$bar
,
$bar
;
1
N/A
grep
(
not
(
$bar
)
,
$bar
)
;
1
N/A
grep
(
not
(
$bar
,
$bar
)
,
$bar
)
;
1
N/A
grep
(
(
not
$bar
,
$bar
,
$bar
)
,
$bar
)
;
1
N/A
];