File: 05_asterisk.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 (44 lines) | stat: -rw-r--r-- 766 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
#!/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 #87261 for CSS-Tiny: Bug with properties starting with asterisk

# Test parsing of CSS selectors with multiple whitespace elements
my $css = CSS::Tiny->read_string( <<'END_CSS' );
.mycls {
  *display: inline;
  *zoom: 1;
}
END_CSS

if (!defined $css) {
	BAIL_OUT('CSS:Tiny object not created');
}

isa_ok( $css, 'CSS::Tiny' );
is_deeply(
	[ %$css ],
	[
		'.mycls' => {
			'*display' => 'inline',
			'*zoom' => 1,
		},
	],
	'Bug 87261: Parsing properties starting with asterisk',
);