File: 04_rt.t

package info (click to toggle)
libcss-tiny-perl 1.20-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 108 kB
  • sloc: perl: 272; makefile: 2
file content (37 lines) | stat: -rw-r--r-- 682 bytes parent folder | download | duplicates (3)
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
#!/usr/bin/perl

# This test holds regression tests based on samples provided in various
# rt.cpan.org bug reports.

use strict;
BEGIN {
	$|  = 1;
	$^W = 1;
}

use Test::More tests => 2;
use CSS::Tiny;





######################################################################
# Bug #60776 for CSS-Tiny: Bug in selector parsing in CSS::Tiny

# Test parsing of CSS selectors with multiple whitespace elements
my $css = CSS::Tiny->read_string( <<'END_CSS' );
.test  .bodySettings  {
  font-size:  12px;
}
END_CSS
isa_ok( $css, 'CSS::Tiny' );
is_deeply(
	[ %$css ],
	[
		'.test .bodySettings' => {
			'font-size' => '12px',
		},
	],
	'Bug 60776: Parsing with multiple whitespace',
);