You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@xerces.apache.org by ja...@apache.org on 2001/06/14 07:44:17 UTC
cvs commit: xml-xerces/perl/t DOMParser.t
jasons 01/06/13 22:44:17
Modified: perl/t DOMParser.t
Log:
* t/DOMParser.t (Repository):
New test to ensure that a fatal error is really fatal
Revision Changes Path
1.5 +8 -1 xml-xerces/perl/t/DOMParser.t
Index: DOMParser.t
===================================================================
RCS file: /home/cvs/xml-xerces/perl/t/DOMParser.t,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- DOMParser.t 2001/05/05 23:11:51 1.4
+++ DOMParser.t 2001/06/14 05:44:17 1.5
@@ -7,7 +7,7 @@
# 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"; }
+BEGIN { $| = 1; print "1..3\n"; }
END {print "not ok 1\n" unless $loaded;}
use Carp;
use XML::Xerces;
@@ -71,3 +71,10 @@
result(! $?);
END {unlink $file;}
+
+# test that our error handler generates a die() with a fatal error
+my $DOM = new XML::Xerces::DOMParser;
+my $ERROR_HANDLER = XML::Xerces::PerlErrorHandler->new();
+$DOM->setErrorHandler($ERROR_HANDLER);
+eval "$DOM->parse(XML::Xerces::LocalFileInputSource->new('/I/AM/NOT/A/FILE'));";
+result($@);
---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org