#!/bin/sh
-runtimes="gawk bawk goawk"
+runtimes="gawk bawk mawk goawk"
BR='
'
assert '***str**em*' '<p><em><strong>str</strong>em</em></p>' "em strong"
assert '_**strem**_' '<p><em><strong>strem</strong></em></p>' "em strong"
+assert '*foo**str**bar**str**qua*' '<p><em>foo<strong>str</strong>bar<strong>str</strong>qua</em></p>' 'em strong asterisk'
+assert '**foo*em*bar*em*qua**' '<p><strong>foo<em>em</em>bar<em>em</em>qua</strong></p>' 'strong em asterisk'
+
+assert '_foo__str__bar__str__qua_' '<p><em>foo__str__bar__str__qua</em></p>' 'em embedded underscore'
+assert '__foo_em_bar_em_qua__' '<p><strong>foo_em_bar_em_qua</strong></p>' 'strong embedded underscore'
+assert '_**str**foo**str**_' '<p><em><strong>str</strong>foo<strong>str</strong></em></p>' 'em strong mixed'
+
assert '_foo_-> bar' '<p><em>foo</em>→ bar</p>' 'arrow'
assert '`_foo_-> bar`' '<p><code>_foo_-> bar</code></p>' 'arrow'
assert '<!-- comment --> <- comment' '<p><!-- comment --> ← comment</p>' 'arrow'