XML-LibXML-PrettyPrint

 view release on metacpan or  search on metacpan

COPYRIGHT  view on Meta::CPAN

Files: Changes
 META.json
 META.yml
 bin/xml-pretty
 dist.ini
 doap.ttl
 t/01basic.t
 t/02stripws.t
 t/03indent.t
 t/04print.t
 t/61cdata.t
Copyright: Copyright 2014 Toby Inkster.
License: GPL-1.0+ or Artistic-1.0

Files: CONTRIBUTING
 INSTALL
 LICENSE
Copyright: Unknown
License: Unknown

Files: COPYRIGHT

MANIFEST  view on Meta::CPAN

README
SIGNATURE
bin/xml-pretty
dist.ini
doap.ttl
lib/XML/LibXML/PrettyPrint.pm
t/01basic.t
t/02stripws.t
t/03indent.t
t/04print.t
t/61cdata.t

SIGNATURE  view on Meta::CPAN

SHA1 6b4b5ce140b37e3b2e5686b3e71e2b27bed7eabd Makefile.PL
SHA1 d4a45b1e73bdd357c916ef65fa0e95787e8fb65b README
SHA1 dd9cfd0f38b1d1298314067b60ab0271f473c142 bin/xml-pretty
SHA1 00647e67b80290beb5bd443600e2ffbf78a2f5ad dist.ini
SHA1 89c9e1f101fbc79f0f9239524f8c353cc2523d3a doap.ttl
SHA1 b1c8692f77c7733f3ca33ae5e65d3b7c576d40e6 lib/XML/LibXML/PrettyPrint.pm
SHA1 c82ab8fae485e1a9e001396df6704cc6f8c7c8bb t/01basic.t
SHA1 c550c210305138773f131e8c3f1c3a913ba39044 t/02stripws.t
SHA1 8a62b327296101e3fb42a63838f7a84cc61c0ddf t/03indent.t
SHA1 ca9f29693ddaa38c18b7c75409559f50a349871e t/04print.t
SHA1 6046af4b34a46a2c0b2308ca2467b855ed7eaecd t/61cdata.t
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1

iEYEARECAAYFAlQMLgQACgkQzr+BKGoqfTlP8QCgp/hBVqESXpUWVK/L8zP84kVm
Ye0An0yDI290XyYM/1ust9Qcp+dpnjIq
=Ht8E
-----END PGP SIGNATURE-----

t/61cdata.t  view on Meta::CPAN

use strict;
use warnings;
use Test::More;
use Test::Warnings qw(warnings);

use XML::LibXML;
use XML::LibXML::PrettyPrint;

my $cdata_string = q{Strunk &
    white};

my $doc = XML::LibXML->createDocument();
my $node = XML::LibXML::Element->new('Top');
my $cdata = $doc->createCDATASection($cdata_string);
$doc->addChild($node);
$node->addChild($cdata);

my @warnings = warnings {
	XML::LibXML::PrettyPrint
		-> new(indent_string => "\t")
		-> pretty_print($doc)
};

is_deeply(\@warnings, [], 'Should not warn on CDATA');
is($cdata->data, $cdata_string, 'CDATA contents should be left untouched.');

done_testing;



( run in 0.659 second using v1.01-cache-2.11-cpan-454fe037f31 )