]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - gnu/usr.bin/perl/perl/t/op/local.t
Add the missing rerelease target back.
[FreeBSD/FreeBSD.git] / gnu / usr.bin / perl / perl / t / op / local.t
1 #!./perl
2
3 # $Header: /home/cvs/386BSD/ports/lang/perl/t/op/local.t,v 1.1.1.1 1993/08/23 21:30:03 nate Exp $
4
5 print "1..20\n";
6
7 sub foo {
8     local($a, $b) = @_;
9     local($c, $d);
10     $c = "ok 3\n";
11     $d = "ok 4\n";
12     { local($a,$c) = ("ok 9\n", "ok 10\n"); ($x, $y) = ($a, $c); }
13     print $a, $b;
14     $c . $d;
15 }
16
17 $a = "ok 5\n";
18 $b = "ok 6\n";
19 $c = "ok 7\n";
20 $d = "ok 8\n";
21
22 print do foo("ok 1\n","ok 2\n");
23
24 print $a,$b,$c,$d,$x,$y;
25
26 # same thing, only with arrays and associative arrays
27
28 sub foo2 {
29     local($a, @b) = @_;
30     local(@c, %d);
31     @c = "ok 13\n";
32     $d{''} = "ok 14\n";
33     { local($a,@c) = ("ok 19\n", "ok 20\n"); ($x, $y) = ($a, @c); }
34     print $a, @b;
35     $c[0] . $d{''};
36 }
37
38 $a = "ok 15\n";
39 @b = "ok 16\n";
40 @c = "ok 17\n";
41 $d{''} = "ok 18\n";
42
43 print do foo2("ok 11\n","ok 12\n");
44
45 print $a,@b,@c,%d,$x,$y;