File: 19-style.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 (20 lines) | stat: -rw-r--r-- 356 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use strict;
use warnings;

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

# test: style

my $svg  = SVG->new;
my $defs = $svg->defs();
my $rect = $svg->rect(
    x      => 10,
    y      => 10,
    width  => 10,
    height => 10,
    style  => { fill => 'red', stroke => 'green' }
);
my $out = $svg->xmlify;
like( $out, qr/stroke\s*:\s*green/, "inline css defs" );