From: Ilya M. <m_...@us...> - 2003-03-26 21:21:43
|
Update of /cvsroot/perl-xml/XML-LibXML-XPathContext/t In directory sc8-pr-cvs1:/tmp/cvs-serv26744/t Modified Files: 00-xpathcontext.t Log Message: Add unregisterNs() method Index: 00-xpathcontext.t =================================================================== RCS file: /cvsroot/perl-xml/XML-LibXML-XPathContext/t/00-xpathcontext.t,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- 00-xpathcontext.t 20 Mar 2003 10:16:25 -0000 1.3 +++ 00-xpathcontext.t 26 Mar 2003 21:21:40 -0000 1.4 @@ -1,5 +1,5 @@ use Test; -BEGIN { plan tests => 16 }; +BEGIN { plan tests => 17 }; use XML::LibXML; use XML::LibXML::XPathContext; @@ -38,6 +38,11 @@ my $xc = XML::LibXML::XPathContext->new($doc1); $xc->registerNs('xxx', 'http://example.com/foobar'); ok($xc->findnodes('/xxx:foo')->pop->nodeName eq 'foo'); + +# test unregisterNs() +$xc->unregisterNs('xxx'); +eval { $xc->findnodes('/xxx:foo') }; +ok($@); # test getContextNode and setContextNode ok($xc->getContextNode->isSameNode($doc1)); |