File: test_new_features_3_15.t

package info (click to toggle)
libxml-twig-perl 1%3A3.34-1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 2,036 kB
  • ctags: 806
  • sloc: perl: 18,640; xml: 202; makefile: 18
file content (30 lines) | stat: -rwxr-xr-x 654 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
#!/usr/bin/perl -w
use strict;

# $Id: /xmltwig/trunk/t/test_new_features_3_15.t 4 2007-03-16T12:16:25.259192Z mrodrigu  $

# test designed to improve coverage of the module

use strict;
use Carp;

use File::Spec;
use lib File::Spec->catdir(File::Spec->curdir,"t");
use tools;

#$|=1;
my $DEBUG=0;

use XML::Twig;

my $TMAX=1; 
print "1..$TMAX\n";

{ my $indented="<doc>\n  <elt/>\n</doc>\n";
  (my $straight=$indented)=~ s{\s}{}g;
  is( XML::Twig->new( pretty_print => 'indented')->parse( $indented)->sprint,
      $indented, "pretty printed doc"); exit;
  is( XML::Twig->new()->parse( $indented)->sprint,
      $straight, "non pretty printed doc");
}