home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / perl560.zip / t / lib / english.t < prev    next >
Text File  |  2000-01-09  |  1KB  |  48 lines

  1. #!./perl
  2.  
  3. print "1..16\n";
  4.  
  5. BEGIN { unshift @INC, '../lib' }
  6. use English;
  7. use Config;
  8. my $threads = $Config{'use5005threads'} || 0;
  9.  
  10. print $PID == $$ ? "ok 1\n" : "not ok 1\n";
  11.  
  12. $_ = 1;
  13. print $ARG == $_  || $threads ? "ok 2\n" : "not ok 2\n";
  14.  
  15. sub foo {
  16.     print $ARG[0] == $_[0] || $threads ? "ok 3\n" : "not ok 3\n";
  17. }
  18. &foo(1);
  19.  
  20. if ($threads) {
  21.     $_ = "ok 4\nok 5\nok 6\n";
  22. } else {
  23.     $ARG = "ok 4\nok 5\nok 6\n";
  24. }
  25. /ok 5\n/;
  26. print $PREMATCH, $MATCH, $POSTMATCH;
  27.  
  28. $OFS = " ";
  29. $ORS = "\n";
  30. print 'ok',7;
  31. undef $OUTPUT_FIELD_SEPARATOR;
  32.  
  33. if ($threads) { $" = "\n" } else { $LIST_SEPARATOR = "\n" };
  34. @foo = ("ok 8", "ok 9");
  35. print "@foo";
  36. undef $OUTPUT_RECORD_SEPARATOR;
  37.  
  38. eval 'NO SUCH FUNCTION';
  39. print "ok 10\n" if $EVAL_ERROR =~ /method/ || $threads;
  40.  
  41. print $UID == $< ? "ok 11\n" : "not ok 11\n";
  42. print $GID == $( ? "ok 12\n" : "not ok 12\n";
  43. print $EUID == $> ? "ok 13\n" : "not ok 13\n";
  44. print $EGID == $) ? "ok 14\n" : "not ok 14\n";
  45.  
  46. print $PROGRAM_NAME == $0 ? "ok 15\n" : "not ok 15\n";
  47. print $BASETIME == $^T ? "ok 16\n" : "not ok 16\n";
  48.