<document source="test data">
    <section ids="if-test" names="if test">
        <title>
            If Test
        <paragraph>
            The following directive causes an error.
        <system_message level="1" line="6" source="test data" type="INFO">
            <paragraph>
                No directive entry for "if" in module "Text::Restructured::Directive".
                Trying "if" as canonical directive name.
        <system_message level="4" line="6" source="test data" type="SEVERE">
            <paragraph>
                Error executing "if" directive: Illegal division by zero at (eval 17) line 1.
                .
            <literal_block xml:space="preserve">
                .. if:: $a = 4/0;
                \n\
                   This text should not appear.
        <paragraph>
            An if directive with no content is an error.
        <system_message level="3" line="12" source="test data" type="ERROR">
            <paragraph>
                Error in "if" directive:
                The if directive must have content.
            <literal_block xml:space="preserve">
                .. if:: 1
        <paragraph>
            An if directive with no arguments is also an error.
        <system_message level="3" line="16" source="test data" type="ERROR">
            <paragraph>
                Error in "if" directive:
                1 argument(s) required, 0 supplied.
            <literal_block xml:space="preserve">
                .. if::
                \n\
                   There was no argument.
        <paragraph>
            An if directive with an option is also a problem.
        <system_message level="3" line="22" source="test data" type="ERROR">
            <paragraph>
                Error in "if" directive:
                unknown option: "nosuchoption".
            <literal_block xml:space="preserve">
                .. if:: 1
                   :nosuchoption:
                \n\
                   Option causes an error.
        <paragraph>
            A paragraph.
