CSS-Minifier-XS
view release on metacpan or search on metacpan
my $expect = 'div{background:url(foo.gif) no-repeat}';
my $got = minify($given);
is $got, $expect;
};
};
###############################################################################
# Removal of trailing semi-colons, at end of a group.
subtest 'trailing semi-colons' => sub {
subtest 'at end of group; removed' => sub {
my $given = 'h1 { font-weight: bold; }';
my $expect = 'h1{font-weight:bold}';
my $got = minify($given);
is $got, $expect;
};
subtest 'inside of group; preserved' => sub {
my $given = 'h1 { font-weight: bold; color: red;}';
my $expect = 'h1{font-weight:bold;color:red}';
my $got = minify($given);
is $got, $expect;
};
};
###############################################################################
# Comments get minified and removed, UNLESS they contain the word
# "copyright" in them.
subtest 'comments' => sub {
subtest 'block comment removed' => sub {
( run in 0.221 second using v1.01-cache-2.11-cpan-3989ada0592 )