=============================================================
Test for the ''tmpl'' - simple, but fast templates in python.
=============================================================

First import the mixin class, we can use it also standalone.

    >>> from cornerstone.browser.tmpl import HTMLRendererMixin
    >>> renderer = HTMLRendererMixin()

A simple tag, no attributes, no contained text.

    >>> renderer._tag('hr')
    u'<hr />'

Tag with contained text

    >>> renderer._tag('div', 'Lorem Ipsum.')
    u'<div>Lorem Ipsum.</div>'

Tag with empty contained text

    >>> renderer._tag('div', '')
    u'<div></div>'

Tag with contained text

    >>> renderer._tag('a', 'Lorem Ipsum.', href='http://zope.org')
    u'<a href="http://zope.org">Lorem Ipsum.</a>'


    >>> renderer._tag('div', 'Lorem Ipsum. ', 
    ...               renderer._tag('a', 'Zope', href='http://zope.org'), 
    ...               renderer._tag('div', _class='foo'), 
    ...               _class='zope')
     u'<div class="zope">Lorem Ipsum. <a href="http://zope.org">Zope</a><div 
     class="foo" /></div>'

    >> interact(locals())