b9bcc2354b924bbae888c9b506850b40d8b4de52
[catagits/Web-Simple.git] / t / css_declare.t
1 use strict; use warnings FATAL => 'all';
2 use Test::More qw(no_plan);
3
4 {
5
6   package Foo;
7
8   sub foo {
9     use CSS::Declare;
10     eval "color 'red'";
11     [
12        '*' => [ color 'red' ],
13        'tr, td' => [ margin '1px' ],
14     ];
15   }
16 }
17
18 is(
19    CSS::Declare::to_css_string(Foo::foo()),
20   '* {color:red} tr, td {margin:1px}',
21   'Basic CSS::Declare usage'
22 );
23
24 ok(!eval "color 'red'", 'Death on use of unimported tag');
25