]>
Commit | Line | Data |
---|---|---|
1 | #!/usr/bin/perl | |
2 | use strict; | |
3 | use warnings; | |
4 | ||
5 | use Test::More tests => 5; | |
6 | BEGIN { use_ok('SVG::SpriteMaker') }; | |
7 | ||
8 | # Don't warn, we intentionally have a duplicate ID | |
9 | local $ENV{SVG_SPRITEMAKER_NO_DUPLICATE_WARNINGS} = 1; | |
10 | my $sprite = make_sprite frag => <t/*.svg>; | |
11 | my @elements = $sprite->getFirstChild->getChildren; | |
12 | ||
13 | ok $sprite->getElementByID('frag-rect'), 'sprite contains #frag-rect'; | |
14 | ok $sprite->getElementByID('frag-circle'), 'sprite contains #frag-circle'; | |
15 | like $sprite->xmlify, qr/id="thing"/, 'sprite contains #thing'; | |
16 | like $sprite->xmlify, qr/id="thing_"/, 'sprite contains #thing_'; |