# Before `make install' is performed this script should be runnable with
# `make test'. After `make install' it should work as `perl CanonicalizeXML.t'
#########################
# change 'tests => 1' to 'tests => last_test_to_print';
use Test::More tests => 3;
BEGIN { use_ok('XML::CanonicalizeXML') };
#########################
my $soapbody=
'
';
$body_xpath=
'
(//. | //@* | //namespace::*)[ancestor-or-self::SOAP-ENV:Body]
';
#$si_xpath=
#'
#(//. | //@* | //namespace::*)[ancestor-or-self::ds:SignedInfo]
#';*/
$testresult1=
'
';
$testresult2=
'
';
$test1=XML::CanonicalizeXML::canonicalize($soapbody, $body_xpath,
"SOAP-ENV", 1, 0);
$test2=XML::CanonicalizeXML::canonicalize($soapbody, $body_xpath,
"SOAP-ENV", 0, 0);
is($test1, $testresult1, 'exclusive canonicalization test');
is($test2, $testresult2, 'inclusive canonicalization test');