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 31 32 33 34 35 36 37 38
|
use strict;
use warnings;
use lib qw( ./lib ../lib );
use Test::More;
plan(tests => 2);
use_ok('CSS::Inliner::Parser');
my $css = <<END;
.foo {
color: red;
}
.bar {
color: blue;
font-weight: bold;
}
.biz {
color: green;
font-size: 10px;
}
.foo {
color: red;
}
.bar {
color: blue;
font-weight: bold;
}
END
my $simple = CSS::Inliner::Parser->new();
$simple->read({ css => $css });
my $ordered = $simple->write();
# check to make sure that our shuffled hashes matched up...
ok($css eq $ordered);
|