Very exciting news to hear about Haml possibly being adopted by Zend framework!
I think ideally we would have unit tests or specs that demonstrate
much smaller units of the Haml language, in order to provide a guide
from a development standpoint, of what the language is and isn't.
The examples you provided here (and the tests that are already in
Haml) are useful more as functional tests to make sure your
parser/precompiler/renderer are all working well together.
What would have helped me in developing Lua haml would be something
like a list of really small, lower-level specifications like:
%p => "<p></p>
%p.class1 => <p class='class1'></p>
%p hello => <p>hello</p>
%p:p => <p:p></p:p>
etc.
With good commenting I think this would be a more effective guide for
developers as to what the Haml language is supposed to be.
Regards,
Norm