Commit cbe40f27 authored by Benjamin Otte's avatar Benjamin Otte

tests: Add a parsing test for nth-child()

Now that we support the an+b notation, make sure we really do.
Maybe my generating script went a bit overboard with the space
possibilities though...
parent 3bdde54a
......@@ -297,6 +297,8 @@ EXTRA_DIST += \
linear-gradient.ref.css \
no-semicolon.css \
no-semicolon.ref.css \
nth-child.css \
nth-child.ref.css \
pseudo-classes-unknown.css \
pseudo-classes-unknown.errors \
pseudo-classes-unknown.ref.css \
......
a:nth-last-child( odd ) { color: red }
a:nth-child(even ) { color: red }
b:nth-child( /**/n) { color: red }
c:nth-child(/**/ n +
0) { color: red }
d:nth-child( n + 1) { color: red }
e:nth-child( /**/n+ 2) { color: red }
f:nth-last-child( n+ 10) { color: red }
g:nth-child(
n) { color: red }
h:nth-child(/**/ n
- 0) { color: red }
i:nth-child(
/**/ n -1) { color: red }
j:nth-child(/**/ /**/n - 2) { color: red }
k:nth-last-child( n -
10) { color: red }
l:nth-last-child( /**/0) { color: red }
m:nth-child(
0n) { color: red }
n:nth-last-child( /**/0/**/n
+
0) { color: red }
o:nth-last-child( 0 n + 1) { color: red }
p:nth-last-child( 0n+/**/2) { color: red }
q:nth-last-child(
0 n + 10) { color: red }
r:nth-child( 0
n) { color: red }
s:nth-child(
0 n -/**/0) { color: red }
t:nth-last-child(
0
n
- 1) { color: red }
u:nth-last-child( 0 n -/**/2) { color: red }
v:nth-last-child( 0n -10) { color: red }
w:nth-last-child( 1) { color: red }
x:nth-child(
1n) { color: red }
y:nth-child(/**//**/1 n +
0) { color: red }
z:nth-child(
1
n +
1) { color: red }
ab:nth-child(
1 n +2) { color: red }
bb:nth-last-child( 1n +
10) { color: red }
cb:nth-last-child(1/**/n) { color: red }
db:nth-last-child( 1 n -0) { color: red }
eb:nth-child( 1 n-
1) { color: red }
fb:nth-child(/**/
1 n-
2) { color: red }
gb:nth-child( 1n -10) { color: red }
hb:nth-last-child(/**/ 2) { color: red }
ib:nth-child( 2 n) { color: red }
jb:nth-last-child( 2 n +
0) { color: red }
kb:nth-child(/**/ 2n+ 1) { color: red }
lb:nth-child(/**//**/2/**/n
+ 2) { color: red }
mb:nth-last-child(
2
n +
10) { color: red }
nb:nth-last-child(
2n) { color: red }
ob:nth-child(
2 n - 0) { color: red }
pb:nth-last-child(
2n/**/-/**/1) { color: red }
qb:nth-child( /**/2 n - 2) { color: red }
rb:nth-last-child(
2/**/n - 10) { color: red }
sb:nth-child( 10) { color: red }
tb:nth-last-child(
10n) { color: red }
ub:nth-last-child(
10/**/n/**/+ 0) { color: red }
vb:nth-child( 10
n+/**/1) { color: red }
wb:nth-last-child( 10 n +
2) { color: red }
xb:nth-child( 10/**/n + 10) { color: red }
yb:nth-last-child( 10
n) { color: red }
zb:nth-last-child( 10 n
-0) { color: red }
ac:nth-last-child(10n/**/-
1) { color: red }
bc:nth-child( 10 n
-/**/2) { color: red }
cc:nth-child(
/**/10 n
- 10) { color: red }
dc:nth-child( even ) { color: red }
ec:nth-last-child(
+
/**/n) { color: red }
fc:nth-child( + n+
0) { color: red }
gc:nth-child(/**/+
n + 1) { color: red }
hc:nth-last-child(/**/+ n +/**/2) { color: red }
ic:nth-last-child( +
n +10) { color: red }
jc:nth-last-child( + n) { color: red }
kc:nth-last-child( +/**/ n - 0) { color: red }
lc:nth-last-child( +n - 1) { color: red }
mc:nth-child(
+ n-2) { color: red }
nc:nth-last-child(+ n -10) { color: red }
oc:nth-child(
+ 0) { color: red }
pc:nth-child( +0 n) { color: red }
qc:nth-last-child( +/**/0/**/n
+
0) { color: red }
rc:nth-last-child(/**/+ 0 n + 1) { color: red }
sc:nth-last-child(
+0 n/**/+2) { color: red }
tc:nth-child( + 0
n+ 10) { color: red }
uc:nth-child(
+ 0
n) { color: red }
vc:nth-last-child(
+ 0n
-
0) { color: red }
wc:nth-last-child(/**/+/**/0n - 1) { color: red }
xc:nth-child( +
0n - 2) { color: red }
yc:nth-last-child(
+ 0/**/n -/**/10) { color: red }
zc:nth-child(+
1) { color: red }
ad:nth-child(/**/+ 1
n) { color: red }
bd:nth-last-child(+/**/1 n +
0) { color: red }
cd:nth-child(/**/+/**/1
n +
1) { color: red }
dd:nth-child(/**/+
1 n +2) { color: red }
ed:nth-child(
+ 1n +
10) { color: red }
fd:nth-child( + 1 n) { color: red }
gd:nth-child( + 1
n -0) { color: red }
hd:nth-child(+ 1n- 1) { color: red }
id:nth-child( + 1 n- 2) { color: red }
jd:nth-last-child( +/**/1n -/**/10) { color: red }
kd:nth-last-child( + 2) { color: red }
ld:nth-child(/**/+ 2n) { color: red }
md:nth-last-child( + 2 n/**/+/**/0) { color: red }
nd:nth-child(/**/+ 2
n + 1) { color: red }
od:nth-child( + 2 n +
2) { color: red }
pd:nth-last-child(
+ 2/**/n +/**/10) { color: red }
qd:nth-last-child(+/**/2/**/n) { color: red }
rd:nth-child(+ 2 n/**/-0) { color: red }
sd:nth-child( + 2
n - 1) { color: red }
td:nth-last-child( +2
n
- 2) { color: red }
ud:nth-last-child( + 2
n - 10) { color: red }
vd:nth-last-child(+ 10) { color: red }
wd:nth-child( +10n) { color: red }
xd:nth-last-child(/**/+
10
n + 0) { color: red }
yd:nth-last-child(/**/+ 10 n +/**/1) { color: red }
zd:nth-last-child( + 10 n+ 2) { color: red }
ae:nth-last-child(
+ 10 n +/**/10) { color: red }
be:nth-last-child( + 10/**/n) { color: red }
ce:nth-last-child( + 10/**/n- 0) { color: red }
de:nth-child(+10 n-
1) { color: red }
ee:nth-last-child( +/**/10 n/**/-2) { color: red }
fe:nth-last-child( +
10/**/n -10) { color: red }
ge:nth-last-child(
odd/**/) { color: red }
he:nth-last-child(/**/- n) { color: red }
ie:nth-last-child(
-
n +
0) { color: red }
je:nth-child(-/**/ n + 1) { color: red }
ke:nth-last-child(/**/- n +2) { color: red }
le:nth-last-child(/**/- n
+ 10) { color: red }
me:nth-last-child(
-/**/ n) { color: red }
ne:nth-child(
- n
- 0) { color: red }
oe:nth-last-child(- /**/n-1) { color: red }
pe:nth-child( -
n - 2) { color: red }
qe:nth-last-child(/**/-/**//**/n/**/- 10) { color: red }
re:nth-child( -/**/0) { color: red }
se:nth-last-child(/**/-
0 n) { color: red }
te:nth-child(
- 0 n+
0) { color: red }
ue:nth-child( -
0/**/n+/**/1) { color: red }
ve:nth-last-child(
-/**/0 n
+ 2) { color: red }
we:nth-last-child(
-0 n/**/+ 10) { color: red }
xe:nth-last-child(- 0
n) { color: red }
ye:nth-last-child( -0 n
- 0) { color: red }
ze:nth-last-child( - 0 n -/**/1) { color: red }
af:nth-last-child( -0/**/n - 2) { color: red }
bf:nth-child( - 0n
-10) { color: red }
cf:nth-child( - 1) { color: red }
df:nth-child( - 1
n) { color: red }
ef:nth-last-child(/**/-1 n+ 0) { color: red }
ff:nth-child(
-/**/1 n/**/+
1) { color: red }
gf:nth-last-child(-
1 n + 2) { color: red }
hf:nth-last-child( -
1 n
+
10) { color: red }
if:nth-child(
- 1 n) { color: red }
jf:nth-last-child(- 1 n - 0) { color: red }
kf:nth-child(- 1 n -
1) { color: red }
lf:nth-child( - 1/**/n -/**/2) { color: red }
mf:nth-last-child( -
1/**/n -/**/10) { color: red }
nf:nth-last-child(/**/-/**/2) { color: red }
of:nth-child( - 2/**/n) { color: red }
pf:nth-child(
- 2
n + 0) { color: red }
qf:nth-child( - 2 n +/**/1) { color: red }
rf:nth-child(/**/- 2
n +
2) { color: red }
sf:nth-last-child( -/**/2/**/n
+ 10) { color: red }
tf:nth-child( -2 n) { color: red }
uf:nth-child(/**/- 2n - 0) { color: red }
vf:nth-last-child( -2 n-1) { color: red }
wf:nth-last-child(- 2/**/n - 2) { color: red }
xf:nth-child( -2
n-
10) { color: red }
yf:nth-child(
-10) { color: red }
zf:nth-child( - 10/**/n) { color: red }
ag:nth-child(
- 10 n+ 0) { color: red }
bg:nth-last-child(
-/**/10n/**/+1) { color: red }
cg:nth-child( -/**/10 n +2) { color: red }
dg:nth-last-child(/**/-
10 n + 10) { color: red }
eg:nth-last-child(/**/- 10 n) { color: red }
fg:nth-last-child(- 10n - 0) { color: red }
gg:nth-last-child( -10n - 1) { color: red }
hg:nth-child(/**/- 10 n - 2) { color: red }
ig:nth-child(/**/-
10 n -10) { color: red }
a:nth-last-child(odd) {
color: rgb(255,0,0);
}
a:nth-child(even) {
color: rgb(255,0,0);
}
b:nth-child(n) {
color: rgb(255,0,0);
}
c:nth-child(n) {
color: rgb(255,0,0);
}
d:nth-child(n+1) {
color: rgb(255,0,0);
}
e:nth-child(n+2) {
color: rgb(255,0,0);
}
f:nth-last-child(n+10) {
color: rgb(255,0,0);
}
g:nth-child(n) {
color: rgb(255,0,0);
}
h:nth-child(n) {
color: rgb(255,0,0);
}
i:nth-child(n-1) {
color: rgb(255,0,0);
}
j:nth-child(n-2) {
color: rgb(255,0,0);
}
k:nth-last-child(n-10) {
color: rgb(255,0,0);
}
l:nth-last-child(0) {
color: rgb(255,0,0);
}
m:nth-child(0) {
color: rgb(255,0,0);
}
n:nth-last-child(0) {
color: rgb(255,0,0);
}
o:last-child {
color: rgb(255,0,0);
}
p:nth-last-child(2) {
color: rgb(255,0,0);
}
q:nth-last-child(10) {
color: rgb(255,0,0);
}
r:nth-child(0) {
color: rgb(255,0,0);
}
s:nth-child(0) {
color: rgb(255,0,0);
}
t:nth-last-child(-1) {
color: rgb(255,0,0);
}
u:nth-last-child(-2) {
color: rgb(255,0,0);
}
v:nth-last-child(-10) {
color: rgb(255,0,0);
}
w:last-child {
color: rgb(255,0,0);
}
x:nth-child(n) {
color: rgb(255,0,0);
}
y:nth-child(n) {
color: rgb(255,0,0);
}
z:nth-child(n+1) {
color: rgb(255,0,0);
}
ab:nth-child(n+2) {
color: rgb(255,0,0);
}
bb:nth-last-child(n+10) {
color: rgb(255,0,0);
}
cb:nth-last-child(n) {
color: rgb(255,0,0);
}
db:nth-last-child(n) {
color: rgb(255,0,0);
}
eb:nth-child(n-1) {
color: rgb(255,0,0);
}
fb:nth-child(n-2) {
color: rgb(255,0,0);
}
gb:nth-child(n-10) {
color: rgb(255,0,0);
}
hb:nth-last-child(2) {
color: rgb(255,0,0);
}
ib:nth-child(even) {
color: rgb(255,0,0);
}
jb:nth-last-child(even) {
color: rgb(255,0,0);
}
kb:nth-child(odd) {
color: rgb(255,0,0);
}
lb:nth-child(2n+2) {
color: rgb(255,0,0);
}
mb:nth-last-child(2n+10) {
color: rgb(255,0,0);
}
nb:nth-last-child(even) {
color: rgb(255,0,0);
}
ob:nth-child(even) {
color: rgb(255,0,0);
}
pb:nth-last-child(2n-1) {
color: rgb(255,0,0);
}
qb:nth-child(2n-2) {
color: rgb(255,0,0);
}
rb:nth-last-child(2n-10) {
color: rgb(255,0,0);
}
sb:nth-child(10) {
color: rgb(255,0,0);
}
tb:nth-last-child(10n) {
color: rgb(255,0,0);
}
ub:nth-last-child(10n) {
color: rgb(255,0,0);
}
vb:nth-child(10n+1) {
color: rgb(255,0,0);
}
wb:nth-last-child(10n+2) {
color: rgb(255,0,0);
}
xb:nth-child(10n+10) {
color: rgb(255,0,0);
}
yb:nth-last-child(10n) {
color: rgb(255,0,0);
}
zb:nth-last-child(10n) {
color: rgb(255,0,0);
}
ac:nth-last-child(10n-1) {
color: rgb(255,0,0);
}
bc:nth-child(10n-2) {
color: rgb(255,0,0);
}
cc:nth-child(10n-10) {
color: rgb(255,0,0);
}
dc:nth-child(even) {
color: rgb(255,0,0);
}
ec:nth-last-child(n) {
color: rgb(255,0,0);
}
fc:nth-child(n) {
color: rgb(255,0,0);
}
gc:nth-child(n+1) {
color: rgb(255,0,0);
}
hc:nth-last-child(n+2) {
color: rgb(255,0,0);
}
ic:nth-last-child(n+10) {
color: rgb(255,0,0);
}
jc:nth-last-child(n) {
color: rgb(255,0,0);
}
kc:nth-last-child(n) {
color: rgb(255,0,0);
}
lc:nth-last-child(n-1) {
color: rgb(255,0,0);
}
mc:nth-child(n-2) {
color: rgb(255,0,0);
}
nc:nth-last-child(n-10) {
color: rgb(255,0,0);
}
oc:nth-child(0) {
color: rgb(255,0,0);
}
pc:nth-child(0) {
color: rgb(255,0,0);
}
qc:nth-last-child(0) {
color: rgb(255,0,0);
}
rc:last-child {
color: rgb(255,0,0);
}
sc:nth-last-child(2) {
color: rgb(255,0,0);
}
tc:nth-child(10) {
color: rgb(255,0,0);
}
uc:nth-child(0) {
color: rgb(255,0,0);
}
vc:nth-last-child(0) {
color: rgb(255,0,0);
}
wc:nth-last-child(-1) {
color: rgb(255,0,0);
}
xc:nth-child(-2) {
color: rgb(255,0,0);
}
yc:nth-last-child(-10) {
color: rgb(255,0,0);
}
zc:first-child {
color: rgb(255,0,0);
}
ad:nth-child(n) {
color: rgb(255,0,0);
}
bd:nth-last-child(n) {
color: rgb(255,0,0);
}
cd:nth-child(n+1) {
color: