Return-Path: Delivered-To: apmail-xml-xerces-cvs-archive@xml.apache.org Received: (qmail 51822 invoked by uid 500); 14 Jun 2001 05:24:32 -0000 Mailing-List: contact xerces-cvs-help@xml.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: list-post: Reply-To: Delivered-To: mailing list xerces-cvs@xml.apache.org Received: (qmail 51805 invoked by uid 1180); 14 Jun 2001 05:24:30 -0000 Date: 14 Jun 2001 05:24:30 -0000 Message-ID: <20010614052430.51804.qmail@apache.org> From: jasons@apache.org To: xml-xerces-cvs@apache.org Subject: cvs commit: xml-xerces/perl/t XMLException.t jasons 01/06/13 22:24:30 Added: perl/t XMLException.t Log: * t/XMLException.t (Message): Test for exception handler Revision Changes Path 1.1 xml-xerces/perl/t/XMLException.t Index: XMLException.t =================================================================== # Before `make install' is performed this script should be runnable # with `make test'. After `make install' it should work as `perl # SAXParser.t' ######################### We start with some black magic to print on failure. # Change 1..1 below to 1..last_test_to_print . # (It may become useful if the test is moved to ./t subdirectory.) BEGIN { $| = 1; print "1..2\n"; } END {print "not ok 1\n" unless $loaded;} use Carp; # use blib; use XML::Xerces; use Config; use lib 't'; use TestUtils qw(result); use vars qw($i $loaded $error); use strict; $loaded = 1; $i = 1; result($loaded); ######################### End of black magic. # Insert your test code below (better if it prints "ok 13" # (correspondingly "not ok 13") depending on the success of chunk 13 # of the test code): sub handle_xml_exception { my $exception = shift; print STDERR "Received Exception, Found Exception Object\n"; print STDERR "Received Exception, Exception Object Missing!!!\n"; } # test that we get an XMLException with a bogus InputSource $error = 0; XML::Xerces::PerlExceptionHandler->setExceptionHandler(sub{ my $exception = shift; $error = 1; }); XML::Xerces::LocalFileInputSource->new('../I/AM/NOT/A/FILE'); result($error); --------------------------------------------------------------------- To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org For additional commands, e-mail: xerces-cvs-help@xml.apache.org