File: 03-render.t

package info (click to toggle)
libsvg-perl 2.87-1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 464 kB
  • sloc: perl: 2,789; makefile: 2
file content (18 lines) | stat: -rw-r--r-- 637 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use strict;
use warnings;

use Test::More tests => 6;
use SVG;

my $svg = SVG->new;
diag "add circle";
my $e = $svg->circle();
isa_ok $e, 'SVG::Element';
my $output = $svg->render();
ok( $output, "nonempty output of render" );
like $output, qr{<\?xml version="1.0" encoding="UTF-8" standalone="yes"\?>};
like $output,
    qr{<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.0//EN" "http://www.w3.org/TR/2001/REC-SVG-20010904/DTD/svg10.dtd">};
like $output,
    qr{<svg height="100%" width="100%" xmlns="http://www.w3.org/2000/svg" xmlns:svg="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">};
like $output, qr{<circle />};