Commit | Line | Data |
---|---|---|
b1b509f4 MG |
1 | #!/usr/bin/perl |
2 | use strict; | |
3 | use warnings; | |
4 | ||
014f8c27 | 5 | use Test::More tests => 5; |
b1b509f4 MG |
6 | BEGIN { use_ok('SVG::SpriteMaker') }; |
7 | ||
014f8c27 MG |
8 | # Don't warn, we intentionally have a duplicate ID |
9 | local $ENV{SVG_SPRITEMAKER_NO_DUPLICATE_WARNINGS} = 1; | |
b1b509f4 MG |
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'; | |
014f8c27 MG |
15 | like $sprite->xmlify, qr/id="thing"/, 'sprite contains #thing'; |
16 | like $sprite->xmlify, qr/id="thing_"/, 'sprite contains #thing_'; |