catch.tst 334 B

123456789101112131415
  1. % Some interpreted tests of CATCH and THROW for MAIN 9
  2. (Dashed "Expect an Error, that FOO uncaught")
  3. (THROW 'FOO 1)
  4. (shouldbe "Catch should return argument "
  5. (CATCH 'FOO 1)
  6. 1)
  7. (Dashed "Expect 1 to be printed, and 2 returned, no 3")
  8. (Shouldbe "Catch the Thrown value"
  9. (CATCH 'FOO (PROGN (print 1) (throw 'foo 2) (print 3)))
  10. 2)