add tests for directives and substitution definitions