USING: html.templates html.templates.chloe
tools.test io.streams.string kernel sequences ascii boxes
namespaces xml html.components html.forms
-splitting unicode.categories furnace accessors ;
+splitting unicode.categories furnace accessors
+html.templates.chloe.compiler ;
IN: html.templates.chloe.tests
: run-template
"test12" test-template call-template
] run-template
] unit-test
+
+[
+ [
+ "test13" test-template call-template
+ ] run-template
+] [ error>> T{ unknown-chloe-tag f "this-tag-does-not-exist" } = ] must-fail-with
[ drop tag-stack get pop* ]
} cleave ;
+ERROR: unknown-chloe-tag tag ;
+
: compile-chloe-tag ( tag -- )
- ! "Unknown chloe tag: " prepend throw
dup main>> dup tags get at
- [ curry assert-depth ] [ 2drop ] ?if ;
+ [ curry assert-depth ]
+ [ unknown-chloe-tag ]
+ ?if ;
: compile-element ( element -- )
{