Skip to content
Snippets Groups Projects
Commit 72180e43 authored by Jason Edward Stewart's avatar Jason Edward Stewart
Browse files

added extra stringification tests

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@437664 13f79535-47bb-0310-9956-ffa450edef68
parent 056c1e9d
No related branches found
No related tags found
No related merge requests found
# Before `make install' is performed this script should be runnable # Before `make install' is performed this script should be runnable
# with `make test'. After `make install' it should work as `perl # with `make test'. After `make install' it should work as `perl
# XMLUni.t' # XMLUni.t'
#########################################
######################### We start with some black magic to print on failure. # use blib;
use Test::More tests => 5;
BEGIN {use_ok("XML::Xerces")};
END {ok(0) unless $loaded;}
use Carp;
use blib;
use XML::Xerces;
use Test::More tests => 4;
use vars qw($loaded);
use strict; use strict;
$loaded = 1;
ok($loaded, "module loaded");
######################### End of black magic.
# once the unicode constants were not being properly exported # once the unicode constants were not being properly exported
# these tests guard against that happening again # these tests guard against that happening again
ok($XML::Xerces::XMLUni::fgPCDATAString eq '#PCDATA'); is($XML::Xerces::XMLUni::fgPCDATAString, '#PCDATA', 'XMLUni constants exported');
ok($XML::Xerces::XMLUni::fgPubIDString eq 'PUBLIC'); is($XML::Xerces::XMLUni::fgPubIDString, 'PUBLIC', 'XMLUni constants exported');
eval {
my $parser = XML::Xerces::XMLReaderFactory::createXMLReader();
$parser->setFeature($XML::Xerces::XMLUni::fgSAX2CoreNameSpaces, 1)
};
ok(!$@,
"Xerces method arguments now handle magic stringify - SAX2")
or diag(XML::Xerces::error($@));
my $impl = XML::Xerces::DOMImplementationRegistry::getDOMImplementation('LS'); my $impl = XML::Xerces::DOMImplementationRegistry::getDOMImplementation('LS');
my $writer = $impl->createLSSerializer(); my $writer = $impl->createLSSerializer();
eval{$writer->getDomConfig()->setParameter($XML::Xerces::XMLUni::fgDOMWRTFormatPrettyPrint,1)}; eval{$writer->getDomConfig()->setParameter($XML::Xerces::XMLUni::fgDOMWRTFormatPrettyPrint,1)};
ok(!$@, ok(!$@,
"Xerces method arguments now handle magic stringify") "Xerces method arguments now handle magic stringify - DOM")
or diag(XML::Xerces::error($@)); or diag(XML::Xerces::error($@));
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment