{
    "content": [
        {
            "type": "text",
            "text": "# TAP::Parser::Result::Test (perldoc)\n\n## NAME\n\nTAP::Parser::Result::Test - Test result token.\n\n## DESCRIPTION\n\nThis is a subclass of TAP::Parser::Result. A token of this class will be returned if a test line\nis encountered.\n\n## Sections\n\n- **NAME**\n- **VERSION**\n- **DESCRIPTION**\n- **OVERRIDDEN METHODS** (1 subsections)\n\nUse structuredContent.sections for detailed options, examples, and full documentation.\n"
        }
    ],
    "structuredContent": {
        "command": "TAP::Parser::Result::Test",
        "section": "",
        "mode": "perldoc",
        "summary": "TAP::Parser::Result::Test - Test result token.",
        "synopsis": null,
        "tldr_summary": null,
        "tldr_examples": [],
        "tldr_source": null,
        "flags": [],
        "examples": [],
        "see_also": [],
        "section_outline": [
            {
                "name": "NAME",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "VERSION",
                "lines": 2,
                "subsections": []
            },
            {
                "name": "DESCRIPTION",
                "lines": 6,
                "subsections": []
            },
            {
                "name": "OVERRIDDEN METHODS",
                "lines": 3,
                "subsections": [
                    {
                        "name": "Instance Methods",
                        "lines": 99
                    }
                ]
            }
        ],
        "sections": {
            "NAME": {
                "content": "TAP::Parser::Result::Test - Test result token.\n",
                "subsections": []
            },
            "VERSION": {
                "content": "Version 3.43\n",
                "subsections": []
            },
            "DESCRIPTION": {
                "content": "This is a subclass of TAP::Parser::Result. A token of this class will be returned if a test line\nis encountered.\n\n1..1\nok 1 - woo hooo!\n",
                "subsections": []
            },
            "OVERRIDDEN METHODS": {
                "content": "This class is the workhorse of the TAP::Parser system. Most TAP lines will be test lines and if\n\"$result->istest\", then you have a bunch of methods at your disposal.\n",
                "subsections": [
                    {
                        "name": "Instance Methods",
                        "content": "\"ok\"\nmy $ok = $result->ok;\n\nReturns the literal text of the \"ok\" or \"not ok\" status.\n\n\"number\"\nmy $testnumber = $result->number;\n\nReturns the number of the test, even if the original TAP output did not supply that number.\n\n\"description\"\nmy $description = $result->description;\n\nReturns the description of the test, if any. This is the portion after the test number but\nbefore the directive.\n\n\"directive\"\nmy $directive = $result->directive;\n\nReturns either \"TODO\" or \"SKIP\" if either directive was present for a test line.\n\n\"explanation\"\nmy $explanation = $result->explanation;\n\nIf a test had either a \"TODO\" or \"SKIP\" directive, this method will return the accompanying\nexplanation, if present.\n\nnot ok 17 - 'Pigs can fly' # TODO not enough acid\n\nFor the above line, the explanation is *not enough acid*.\n\n\"isok\"\nif ( $result->isok ) { ... }\n\nReturns a boolean value indicating whether or not the test passed. Remember that for TODO tests,\nthe test always passes.\n\nIf the test is unplanned, this method will always return false. See \"isunplanned\".\n\n\"isactualok\"\nif ( $result->isactualok ) { ... }\n\nReturns a boolean value indicating whether or not the test passed, regardless of its TODO\nstatus.\n\n\"actualpassed\"\nDeprecated. Please use \"isactualok\" instead.\n\n\"todopassed\"\nif ( $test->todopassed ) {\n# test unexpectedly succeeded\n}\n\nIf this is a TODO test and an 'ok' line, this method returns true. Otherwise, it will always\nreturn false (regardless of passing status on non-todo tests).\n\nThis is used to track which tests unexpectedly succeeded.\n\n\"todofailed\"\n# deprecated in favor of 'todopassed'.  This method was horribly misnamed.\n\nThis was a badly misnamed method. It indicates which TODO tests unexpectedly succeeded. Will now\nissue a warning and call \"todopassed\".\n\n\"hasskip\"\nif ( $result->hasskip ) { ... }\n\nReturns a boolean value indicating whether or not this test has a SKIP directive.\n\n\"hastodo\"\nif ( $result->hastodo ) { ... }\n\nReturns a boolean value indicating whether or not this test has a TODO directive.\n\n\"asstring\"\nprint $result->asstring;\n\nThis method prints the test as a string. It will probably be similar, but not necessarily\nidentical, to the original test line. Directives are capitalized, some whitespace may be trimmed\nand a test number will be added if it was not present in the original line. If you need the\noriginal text of the test line, use the \"raw\" method.\n\n\"isunplanned\"\nif ( $test->isunplanned ) { ... }\n$test->isunplanned(1);\n\nIf a test number is greater than the number of planned tests, this method will return true.\nUnplanned tests will *always* return false for \"isok\", regardless of whether or not the test\n\"hastodo\".\n\nNote that if tests have a trailing plan, it is not possible to set this property for unplanned\ntests as we do not know it's unplanned until the plan is reached:\n\nprint <<'END';\nok 1\nok 2\n1..1\nEND\n"
                    }
                ]
            }
        }
    }
}