xref: /onnv-gate/usr/src/cmd/perl/5.8.4/distrib/t/op/nothr5005.t (revision 0:68f95e015346)
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
6BEGIN
7 {
8  chdir 't' if -d 't';
9  @INC = '../lib';
10  require Config;
11  import Config;
12  if ($Config{'use5005threads'})
13   {
14    print "1..0 # Skip: this perl is threaded\n";
15    exit 0;
16   }
17 }
18
19
20$|=1;
21
22print "1..9\n";
23$t = 1;
24sub foo { local(@_) = ('p', 'q', 'r'); }
25sub bar { unshift @_, 'D'; @_ }
26sub baz { push @_, 'E'; return @_ }
27for (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 }
36