File: hacks.t

package info (click to toggle)
libcss-inliner-perl 4027-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 416 kB
  • sloc: perl: 882; makefile: 2
file content (44 lines) | stat: -rw-r--r-- 487 bytes parent folder | download | duplicates (2)
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
39
40
41
42
43
44
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 {
  _font-weight: bold;
}
.biz {
  -font-size: 10px;
}
.foo2 {
  w\\idth: 500px;
  width: 130px;
}
END

my $correct = <<END;
.foo {
}
.bar {
}
.biz {
}
.foo2 {
  width: 130px;
}
END

my $simple = CSS::Inliner::Parser->new();

$simple->read({ css => $css });

my $ordered = $simple->write();

ok($correct eq $ordered);