Skip to content

Commit f841ee9

Browse files
committed
Import <unicode-range> tests.
Merge commit 'f38c4c09383407be08977001b1e9870e1bac8197' into unicode-range
2 parents 53e49c3 + f38c4c0 commit f841ee9

File tree

2 files changed

+80
-7
lines changed

2 files changed

+80
-7
lines changed

css-parsing-tests/README.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -94,16 +94,16 @@ associated with the expected result.
9494

9595
``color3_hsl.json``
9696
Same as ``color3.json``.
97-
This file is generated the ``make_color3_hsl.py`` Python script.
97+
This file is generated by the ``make_color3_hsl.py`` Python script.
9898

9999
``color3_keywords.json``
100100
Same as ``color3.json``,
101101
except that the values for the Red, Green and Blue channel
102102
are between 0 and 255.
103-
This file is generated the ``make_color3_keywords.py`` Python script.
103+
This file is generated by the ``make_color3_keywords.py`` Python script.
104104

105-
``an+b.json``
106-
Tests the `an+b <http://dev.w3.org/csswg/css-syntax/#the-anb-type>`_
105+
``An+B.json``
106+
Tests the `An+B <http://dev.w3.org/csswg/css-syntax/#the-anb-type>`_
107107
syntax defined in CSS Syntax Level 3.
108108
This `differs <http://dev.w3.org/csswg/css-syntax/#changes>`_ from the
109109
`nth grammar rule <http://www.w3.org/TR/css3-selectors/#nth-child-pseudo>`_
@@ -121,7 +121,7 @@ AST nodes (the results of parsing) are represented in JSON as follow.
121121
This representation was chosen to be compact
122122
(and thus less annoying to write by hand)
123123
while staying unambiguous.
124-
For example, the difference between @import and \@import is not lost:
124+
For example, the difference between ``@import`` and ``\@import`` is not lost:
125125
they are represented as ``["at-keyword", "import"]`` and ``["ident", "@import"]``,
126126
respectively.
127127

@@ -200,8 +200,8 @@ Component values
200200
and the unit as a string.
201201

202202
<unicode-range>
203-
Array of length 2: the string ``"unicode-range"``, and the range as either
204-
null for the empty range, or an array of two numbers.
203+
Array of length 3: the string ``"unicode-range"``,
204+
followed by the *start* and *end* integers as two numbers.
205205

206206
<include-match>
207207
The string ``"~="``.

css-parsing-tests/component_value_list.json

Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -317,6 +317,79 @@
317317
["dimension", "12", 12, "integer", "rêd"]
318318
],
319319

320+
"u+1 U+10 U+100 U+1000 U+10000 U+100000 U+1000000", [
321+
["unicode-range", 1, 1], " ",
322+
["unicode-range", 16, 16], " ",
323+
["unicode-range", 256, 256], " ",
324+
["unicode-range", 4096, 4096], " ",
325+
["unicode-range", 65536, 65536], " ",
326+
["unicode-range", 1048576, 1048576], " ",
327+
["unicode-range", 1048576, 1048576], ["number", "0", 0, "integer"]
328+
],
329+
330+
"u+? u+1? U+10? U+100? U+1000? U+10000? U+100000?", [
331+
["unicode-range", 0, 15], " ",
332+
["unicode-range", 16, 31], " ",
333+
["unicode-range", 256, 271], " ",
334+
["unicode-range", 4096, 4111], " ",
335+
["unicode-range", 65536, 65551], " ",
336+
["unicode-range", 1048576, 1048591], " ",
337+
["unicode-range", 1048576, 1048576], "?"
338+
],
339+
340+
"u+?? U+1?? U+10?? U+100?? U+1000?? U+10000??", [
341+
["unicode-range", 0, 255], " ",
342+
["unicode-range", 256, 511], " ",
343+
["unicode-range", 4096, 4351], " ",
344+
["unicode-range", 65536, 65791], " ",
345+
["unicode-range", 1048576, 1048831], " ",
346+
["unicode-range", 1048576, 1048591], "?"
347+
],
348+
349+
"u+??? U+1??? U+10??? U+100??? U+1000???", [
350+
["unicode-range", 0, 4095], " ",
351+
["unicode-range", 4096, 8191], " ",
352+
["unicode-range", 65536, 69631], " ",
353+
["unicode-range", 1048576, 1052671], " ",
354+
["unicode-range", 1048576, 1048831], "?"
355+
],
356+
357+
"u+???? U+1???? U+10???? U+100????", [
358+
["unicode-range", 0, 65535], " ",
359+
["unicode-range", 65536, 131071], " ",
360+
["unicode-range", 1048576, 1114111], " ",
361+
["unicode-range", 1048576, 1052671], "?"
362+
],
363+
364+
"u+????? U+1????? U+10?????", [
365+
["unicode-range", 0, 1048575], " ",
366+
["unicode-range", 1048576, 2097151], " ",
367+
["unicode-range", 1048576, 1114111], "?"
368+
],
369+
370+
"u+?????? U+1??????", [
371+
["unicode-range", 0, 16777215], " ",
372+
["unicode-range", 1048576, 2097151], "?"
373+
],
374+
375+
"u+1-2 U+100000-2 U+1000000-2 U+10-200000", [
376+
["unicode-range", 1, 2], " ",
377+
["unicode-range", 1048576, 2], " ",
378+
["unicode-range", 1048576, 1048576], ["number", "0", 0, "integer"],
379+
["number", "-2", -2, "integer"], " ",
380+
["unicode-range", 16, 2097152]
381+
],
382+
383+
"ù+12 Ü+12 u +12 U+ 12 U+12 - 20 U+1?2 U+1?-50", [
384+
["ident", "ù"], ["number", "+12", 12, "integer"], " ",
385+
["ident", "Ü"], ["number", "+12", 12, "integer"], " ",
386+
["ident", "u"], " ", ["number", "+12", 12, "integer"], " ",
387+
["ident", "U"], "+", " ", ["number", "12", 12, "integer"], " ",
388+
["unicode-range", 18, 18], " ", "-", " ", ["number", "20", 20, "integer"], " ",
389+
["unicode-range", 16, 31], ["number", "2", 2, "integer"], " ",
390+
["unicode-range", 16, 31], ["number", "-50", -50, "integer"]
391+
],
392+
320393
"~=|=^=$=*=||<!------> |/**/| ~/**/=", [
321394
"~=", "|=", "^=", "$=", "*=", "||", "<!--", "-", "-", "-->",
322395
" ", "|", "|", " ", "~", "="

0 commit comments

Comments
 (0)