diff options
author | John Mark Bell <jmb@netsurf-browser.org> | 2009-01-14 15:25:43 +0000 |
---|---|---|
committer | John Mark Bell <jmb@netsurf-browser.org> | 2009-01-14 15:25:43 +0000 |
commit | f5197dc5b96bd59b55c2731f56f713202cfe750d (patch) | |
tree | 9424ed3ffb38da7bf967e58e4f232ef46a8f7aa5 /test/data/parse | |
parent | dbac4d510ed167efdd1f13ac37594a52f94e71aa (diff) | |
download | libcss-f5197dc5b96bd59b55c2731f56f713202cfe750d.tar.gz libcss-f5197dc5b96bd59b55c2731f56f713202cfe750d.tar.bz2 |
Support pointers in the expected bytecode.
Add a simple test that uses this functionality.
svn path=/trunk/libcss/; revision=6065
Diffstat (limited to 'test/data/parse')
-rw-r--r-- | test/data/parse/README | 9 | ||||
-rw-r--r-- | test/data/parse/tests1.dat | 7 |
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 |