Commit | Line | Data |
---|---|---|
bf3d9ec5 NIS |
1 | #!./perl |
2 | ||
3 | # NOTE: Please don't add tests to this file unless they *need* to be run in | |
4 | # separate executable and can't simply use eval. | |
5 | ||
6 | BEGIN | |
7 | { | |
8 | chdir 't' if -d 't'; | |
20822f61 | 9 | @INC = '../lib'; |
bf3d9ec5 NIS |
10 | require Config; |
11 | import Config; | |
97404f98 | 12 | if ($Config{'use5005threads'}) |
bf3d9ec5 | 13 | { |
45c0de28 | 14 | print "1..0 # Skip: this perl is threaded\n"; |
bf3d9ec5 NIS |
15 | exit 0; |
16 | } | |
17 | } | |
18 | ||
19 | ||
20 | $|=1; | |
21 | ||
22 | print "1..9\n"; | |
23 | $t = 1; | |
24 | sub foo { local(@_) = ('p', 'q', 'r'); } | |
25 | sub bar { unshift @_, 'D'; @_ } | |
26 | sub baz { push @_, 'E'; return @_ } | |
27 | for (1..3) | |
28 | { | |
29 | print "not " unless join('',foo('a', 'b', 'c')) eq 'pqr'; | |
30 | print "ok ",$t++,"\n"; | |
31 | print "not" unless join('',bar('d')) eq 'Dd'; | |
32 | print "ok ",$t++,"\n"; | |
33 | print "not" unless join('',baz('e')) eq 'eE'; | |
34 | print "ok ",$t++,"\n"; | |
35 | } |