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/10/07 04:51:41 UTC

cvs commit: xml-xerces/perl/t PerlErrorHandler.t

jasons      01/10/06 19:51:41

  Modified:    perl/t   PerlErrorHandler.t
  Log:
  	* t/PerlErrorHandler.t (Repository):
  	Made the second test a validating parser test.
  
  Revision  Changes    Path
  1.5       +5 -7      xml-xerces/perl/t/PerlErrorHandler.t
  
  Index: PerlErrorHandler.t
  ===================================================================
  RCS file: /home/cvs/xml-xerces/perl/t/PerlErrorHandler.t,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- PerlErrorHandler.t	2001/08/02 04:26:54	1.4
  +++ PerlErrorHandler.t	2001/10/07 02:51:41	1.5
  @@ -31,7 +31,6 @@
   my $document = <<\END;
   <?xml version="1.0" encoding="iso-8859-1" standalone="no"?>
   
  -<!DOCTYPE personnel SYSTEM "personal.dtd">
   <!-- @version: -->
   <personnel>
   
  @@ -134,7 +133,7 @@
   
     my $expected_error = <<EOE;
   FATAL ERROR:
  -LINE:    23
  +LINE:    22
   COLUMN:  11
   MESSAGE: Expected end of tag 'foo'
   EOE
  @@ -150,18 +149,17 @@
     my $error_handler = MyErrorHandler->new();
     $dom->setErrorHandler($error_handler);
   
  -  $dom->setDoValidation(1);
  +  $dom->setValidationScheme($XML::Xerces::DOMParser::Val_Always);
     eval {
       $dom->parse(XML::Xerces::MemBufInputSource->new($document, 'foo') );
     };
   
     my $expected_error = <<EOE;
   ERROR:
  -LINE:    19
  -COLUMN:  7
  -MESSAGE: Unknown element 'foo'
  +LINE:    4
  +COLUMN:  11
  +MESSAGE: Unknown element 'personnel'
   EOE
  -#print STDERR "$error\n";
     result($expected_error eq $error);
   }
   
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-cvs-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-cvs-help@xml.apache.org