home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl560.zip / t / op / nothr5005.t < prev    next >
Text File  |  2000-03-22  |  736b  |  36 lines

  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';
  9.   unshift @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.  
  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.  } 
  36.