summaryrefslogtreecommitdiff
path: root/test/data/parse
diff options
context:
space:
mode:
Diffstat (limited to 'test/data/parse')
-rw-r--r--test/data/parse/README9
-rw-r--r--test/data/parse/tests1.dat7
2 files changed, 11 insertions, 5 deletions
diff --git a/test/data/parse/README b/test/data/parse/README
index f1cc46a..135dd3b 100644
--- a/test/data/parse/README
+++ b/test/data/parse/README
@@ -19,8 +19,9 @@ Format of rule list
rule ::= '| ' type ' '+ name
name ::= .+
type ::= [0-9]+
- bytecode ::= '| ' ' '* hexnum (' '+ hexnum)*
+ bytecode ::= '| ' ' '* hexnum (' '+ (hexnum | ptr))*
hexnum ::= '0x' [0-9a-fA-F]+
+ ptr ::= 'PTR(' .* ')'
Type corresponds to css_rule_type. Consult the library sources for the values.
@@ -32,18 +33,16 @@ Example
-------
#data
-* { color: #ff0000 }
+* { color: #ff0000; background-image: url("foo.png"); }
#errors
#expected
| 1 *
| 0x0200000f 0xff000000
+| 0x02000003 PTR(foo.png)
#reset
TODO
----
+ Permit nesting of rules (for nested block support)
- + There's no way of flagging a pointer in the bytecode (ideally, this will
- be defined in such a way that we'll be able to validate the data pointed
- to, too)
diff --git a/test/data/parse/tests1.dat b/test/data/parse/tests1.dat
index 1bd05dc..2aa6f56 100644
--- a/test/data/parse/tests1.dat
+++ b/test/data/parse/tests1.dat
@@ -21,3 +21,10 @@
| 0x0000080f
#reset
+#data
+* { background-image: url("foo.png"); color: inherit }
+#errors
+#expected
+| 1 *
+| 0x02000003 PTR(foo.png) 0x0000080f
+#reset