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:54:58 UTC

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

jasons      01/10/06 19:54:58

  Modified:    perl/t   StdInInputSource.t
  Log:
  	* t/StdInInputSource.t (Repository):
  	Added simple test for creating an input source
  
  Revision  Changes    Path
  1.7       +16 -6     xml-xerces/perl/t/StdInInputSource.t
  
  Index: StdInInputSource.t
  ===================================================================
  RCS file: /home/cvs/xml-xerces/perl/t/StdInInputSource.t,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -r1.6 -r1.7
  --- StdInInputSource.t	2001/04/13 22:25:45	1.6
  +++ StdInInputSource.t	2001/10/07 02:54:58	1.7
  @@ -7,13 +7,17 @@
   # 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;
   
   use lib 't';
  -use TestUtils qw(result $DOM $PERSONAL $PERSONAL_FILE_NAME);
  +use TestUtils qw(result
  +		 is_object
  +		 $DOM
  +		 $PERSONAL_NO_DOCTYPE
  +		 $PERSONAL_NO_DOCTYPE_FILE_NAME);
   use vars qw($i $loaded);
   use strict;
   
  @@ -27,8 +31,14 @@
   # (correspondingly "not ok 13") depending on the success of chunk 13
   # of the test code):
   
  -open(STDIN, $PERSONAL_FILE_NAME)
  -  or die "Couldn't open $PERSONAL_FILE_NAME for reading";
  -$DOM->parse( new XML::Xerces::StdInInputSource );
  +open(STDIN, $PERSONAL_NO_DOCTYPE_FILE_NAME)
  +  or die "Couldn't open $PERSONAL_NO_DOCTYPE_FILE_NAME for reading";
  +my $is = XML::Xerces::StdInInputSource->new();
  +result(is_object($is)
  +       && $is->isa('XML::Xerces::InputSource')
  +       && $is->isa('XML::Xerces::StdInInputSource')
  +      );
  +
  +$DOM->parse($is);
   my $serialize = $DOM->getDocument->serialize;
  -result($serialize eq $PERSONAL);
  +result($serialize eq $PERSONAL_NO_DOCTYPE);
  
  
  

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