File: 05_search.t

package info (click to toggle)
libcss-perl 1.09-2
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 980 kB
  • sloc: perl: 13,716; makefile: 2
file content (20 lines) | stat: -rw-r--r-- 430 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
use Test::Simple tests => 5;

use CSS;
my $css = new CSS;
ok(1, "Created the CSS object ok");

#
# SEARCH TESTS
#

$css->read_file("t/css_simple");
ok(1, "Parsed the simple file ok");

my $style = $css->get_style_by_selector('baz');
ok($style, "Got CSS::Style object ok");

my $prop = $style->get_property_by_name('color');
ok($prop, "Got CSS::Property object ok");

ok($prop->{simple_value} eq 'black', "Got property value ok");