home *** CD-ROM | disk | FTP | other *** search
/ Celestin Apprentice 2 / Apprentice-Release2.iso / Source Code / C / Applications / MacPerl 4.1.3 / Perl / t / op / eval.t < prev    next >
Encoding:
Text File  |  1993-10-23  |  1.2 KB  |  22 lines  |  [TEXT/MPS ]

  1. #!./perl
  2.  
  3. # $RCSfile: eval.t,v $$Revision: 4.0.1.1 $$Date: 91/11/05 18:43:19 $
  4.  
  5. print "1..16\n";
  6.  
  7. eval 'print "ok 1\n";';
  8.  
  9. if ($@ eq '') {print "ok 2\n";} else {print "not ok 2\n";}
  10.  
  11. eval "\$foo\n    = # this is a comment\n'ok 3';";
  12. print $foo,"\n";
  13.  
  14. eval "\$foo\n    = # this is a comment\n'ok 4\n';";
  15. print $foo;
  16.  
  17. print eval '
  18. $foo =';        # this tests for a call through yyerror()
  19. if ($@ =~ /Line 2/) {print "ok 5\n";} else {print "not ok 5\n";}
  20.  
  21. print eval '$foo = /';    # this tests for a call through fatal()
  22. if