<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">"""
    pygments.lexers.testing
    ~~~~~~~~~~~~~~~~~~~~~~~

    Lexers for testing languages.

    :copyright: Copyright 2006-2024 by the Pygments team, see AUTHORS.
    :license: BSD, see LICENSE for details.
"""

from pygments.lexer import RegexLexer, include, bygroups
from pygments.token import Comment, Keyword, Name, String, Number, Generic, Text

__all__ = ['GherkinLexer', 'TAPLexer']


class GherkinLexer(RegexLexer):
    """
    For Gherkin syntax.
    """
    name = 'Gherkin'
    aliases = ['gherkin', 'cucumber']
    filenames = ['*.feature']
    mimetypes = ['text/x-gherkin']
    url = 'https://cucumber.io/docs/gherkin'
    version_added = '1.2'

    feature_keywords = '^(ê¸°ëŠ¥|æ©Ÿèƒ½|åŠŸèƒ½|ãƒ•ã‚£ãƒ¼ãƒãƒ£|Ø®Ø§ØµÙŠØ©|×ª×›×•×&nbsp;×”|Ð¤ÑƒÐ½ÐºÑ†Ñ–Ð¾Ð½Ð°Ð»|Ð¤ÑƒÐ½ÐºÑ†Ð¸Ð¾Ð½Ð°Ð»Ð½Ð¾ÑÑ‚|Ð¤ÑƒÐ½ÐºÑ†Ð¸Ð¾Ð½Ð°Ð»|Ð¤Ð¸Ñ‡Ð°|ÐžÑÐ¾Ð±Ð¸Ð½Ð°|ÐœÐ¾Ð³ÑƒÑ›Ð½Ð¾ÑÑ‚|Ã–zellik|WÅ‚aÅ›ciwoÅ›Ä‡|TÃ­nh nÄƒng|Trajto|SavybÄ—|PoÅ¾iadavka|PoÅ¾adavek|Osobina|Ominaisuus|Omadus|OH HAI|MoguÄ‡nost|Mogucnost|JellemzÅ‘|FÄ«Äa|FunzionalitÃ&nbsp;|FunktionalitÃ¤t|Funkcionalnost|FunkcionalitÄte|FuncÈ›ionalitate|Functionaliteit|Functionalitate|Funcionalitat|Funcionalidade|FonctionnalitÃ©|Fitur|Feature|Egenskap|Egenskab|Crikey|CaracterÃ­stica|Arwedd)(:)(.*)$'
    feature_element_keywords = '^(\\s*)(ì‹œë‚˜ë¦¬ì˜¤ ê°œìš”|ì‹œë‚˜ë¦¬ì˜¤|ë°°ê²½|èƒŒæ™¯|å&nbsp;´æ™¯å¤§ç¶±|å&nbsp;´æ™¯|åœºæ™¯å¤§çº²|åœºæ™¯|åŠ‡æœ¬å¤§ç¶±|åŠ‡æœ¬|å‰§æœ¬å¤§çº²|å‰§æœ¬|ãƒ†ãƒ³ãƒ—ãƒ¬|ã‚·ãƒŠãƒªã‚ªãƒ†ãƒ³ãƒ—ãƒ¬ãƒ¼ãƒˆ|ã‚·ãƒŠãƒªã‚ªãƒ†ãƒ³ãƒ—ãƒ¬|ã‚·ãƒŠãƒªã‚ªã‚¢ã‚¦ãƒˆãƒ©ã‚¤ãƒ³|ã‚·ãƒŠãƒªã‚ª|Ø³ÙŠÙ†Ø§Ø±ÙŠÙˆ Ù…Ø®Ø·Ø·|Ø³ÙŠÙ†Ø§Ø±ÙŠÙˆ|Ø§Ù„Ø®Ù„ÙÙŠØ©|×ª×¨×—×™×©|×ª×‘×&nbsp;×™×ª ×ª×¨×—×™×©|×¨×§×¢|Ð¢Ð°Ñ€Ð¸Ñ…|Ð¡Ñ†ÐµÐ½Ð°Ñ€Ñ–Ð¹|Ð¡Ñ†ÐµÐ½Ð°Ñ€Ð¸Ð¾|Ð¡Ñ†ÐµÐ½Ð°Ñ€Ð¸Ð¹ ÑÑ‚Ñ€ÑƒÐºÑ‚ÑƒÑ€Ð°ÑÐ¸|Ð¡Ñ†ÐµÐ½Ð°Ñ€Ð¸Ð¹|Ð¡Ñ‚Ñ€ÑƒÐºÑ‚ÑƒÑ€Ð° ÑÑ†ÐµÐ½Ð°Ñ€Ñ–ÑŽ|Ð¡Ñ‚Ñ€ÑƒÐºÑ‚ÑƒÑ€Ð° ÑÑ†ÐµÐ½Ð°Ñ€Ð¸Ñ˜Ð°|Ð¡Ñ‚Ñ€ÑƒÐºÑ‚ÑƒÑ€Ð° ÑÑ†ÐµÐ½Ð°Ñ€Ð¸Ñ|Ð¡ÐºÐ¸Ñ†Ð°|Ð&nbsp;Ð°Ð¼ÐºÐ° Ð½Ð° ÑÑ†ÐµÐ½Ð°Ñ€Ð¸Ð¹|ÐŸÑ€Ð¸Ð¼ÐµÑ€|ÐŸÑ€ÐµÐ´Ñ‹ÑÑ‚Ð¾Ñ€Ð¸Ñ|ÐŸÑ€ÐµÐ´Ð¸ÑÑ‚Ð¾Ñ€Ð¸Ñ|ÐŸÐ¾Ð·Ð°Ð´Ð¸Ð½Ð°|ÐŸÐµÑ€ÐµÐ´ÑƒÐ¼Ð¾Ð²Ð°|ÐžÑÐ½Ð¾Ð²Ð°|ÐšÐ¾Ð½Ñ†ÐµÐ¿Ñ‚|ÐšÐ¾Ð½Ñ‚ÐµÐºÑÑ‚|ZaÅ‚oÅ¼enia|Wharrimean is|TÃ¬nh huá»‘ng|The thing of it is|Tausta|Taust|Tapausaihio|Tapaus|Szenariogrundriss|Szenario|Szablon scenariusza|Stsenaarium|Struktura scenarija|Skica|Skenario konsep|Skenario|SituÄcija|Senaryo taslaÄŸÄ±|Senaryo|ScÃ©nÃ¡Å™|ScÃ©nario|Schema dello scenario|ScenÄrijs pÄ“c parauga|ScenÄrijs|ScenÃ¡r|Scenaro|Scenariusz|Scenariul de ÅŸablon|Scenariul de sablon|Scenariu|Scenario Outline|Scenario Amlinellol|Scenario|Scenarijus|Scenarijaus Å¡ablonas|Scenarij|Scenarie|Rerefons|Raamstsenaarium|Primer|PozadÃ­|Pozadina|Pozadie|Plan du scÃ©nario|Plan du ScÃ©nario|Osnova scÃ©nÃ¡Å™e|Osnova|NÃ¡Ärt ScÃ©nÃ¡Å™e|NÃ¡Ärt ScenÃ¡ru|Mate|MISHUN SRSLY|MISHUN|Ká»‹ch báº£n|Konturo de la scenaro|Kontext|Konteksts|Kontekstas|Kontekst|Koncept|Khung tÃ¬nh huá»‘ng|Khung ká»‹ch báº£n|HÃ¡ttÃ©r|Grundlage|GeÃ§miÅŸ|ForgatÃ³kÃ¶nyv vÃ¡zlat|ForgatÃ³kÃ¶nyv|Fono|Esquema do CenÃ¡rio|Esquema do Cenario|Esquema del escenario|Esquema de l\'escenari|Escenario|Escenari|Dis is what went down|Dasar|Contexto|Contexte|Contesto|CondiÅ£ii|Conditii|CenÃ¡rio|Cenario|Cefndir|Bá»‘i cáº£nh|Blokes|Bakgrunn|Bakgrund|Baggrund|Background|B4|Antecedents|Antecedentes|All y\'all|Achtergrond|Abstrakt Scenario|Abstract Scenario)(:)(.*)$'
    examples_keywords = '^(\\s*)(ì˜ˆ|ä¾‹å­|ä¾‹|ã‚µãƒ³ãƒ—ãƒ«|Ø§Ù…Ø«Ù„Ø©|×“×•×’×ž××•×ª|Ð¡Ñ†ÐµÐ½Ð°Ñ€Ð¸Ñ˜Ð¸|ÐŸÑ€Ð¸Ð¼ÐµÑ€Ð¸|ÐŸÑ€Ð¸ÐºÐ»Ð°Ð´Ð¸|ÐœÐ¸ÑÐ¾Ð»Ð»Ð°Ñ€|Ð—Ð½Ð°Ñ‡ÐµÐ½Ð¸Ñ|Ã–rnekler|Voorbeelden|Variantai|Tapaukset|Scenarios|Scenariji|Scenarijai|PÅ™Ã­klady|PÃ©ldÃ¡k|PrÃ­klady|PrzykÅ‚ady|Primjeri|Primeri|PiemÄ“ri|PavyzdÅ¾iai|Paraugs|Juhtumid|Exemplos|Exemples|Exemplele|Exempel|Examples|Esempi|Enghreifftiau|Ekzemploj|Eksempler|Ejemplos|EXAMPLZ|Dá»¯ liá»‡u|Contoh|Cobber|Beispiele)(:)(.*)$'
    step_keywords = '^(\\s*)(í•˜ì§€ë§Œ|ì¡°ê±´|ë¨¼ì&nbsp;€|ë§Œì¼|ë§Œì•½|ë‹¨|ê·¸ë¦¬ê³&nbsp;|ê·¸ëŸ¬ë©´|é‚£éº¼|é‚£ä¹ˆ|è€Œä¸”|ç•¶|å½“|å‰æ|å‡è¨­|å‡è®¾|å‡å¦‚|å‡å®š|ä½†æ˜¯|ä½†ã—|ä¸¦ä¸”|å¹¶ä¸”|åŒæ™‚|åŒæ—¶|ã‚‚ã—|ãªã‚‰ã°|ãŸã&nbsp;ã—|ã—ã‹ã—|ã‹ã¤|Ùˆ |Ù…ØªÙ‰ |Ù„ÙƒÙ† |Ø¹Ù†Ø¯Ù…Ø§ |Ø«Ù… |Ø¨ÙØ±Ø¶ |Ø§Ø°Ø§Ù‹ |×›××©×¨ |×•×’× |×‘×”×™×&nbsp;×ª×Ÿ |××–×™ |××– |××‘×œ |Ð¯ÐºÑ‰Ð¾ |Ð£Ð½Ð´Ð° |Ð¢Ð¾ |ÐŸÑ€Ð¸Ð¿ÑƒÑÑ‚Ð¸Ð¼Ð¾, Ñ‰Ð¾ |ÐŸÑ€Ð¸Ð¿ÑƒÑÑ‚Ð¸Ð¼Ð¾ |ÐžÐ½Ð´Ð° |ÐÐ¾ |ÐÐµÑ…Ð°Ð¹ |Ð›ÐµÐºÐ¸Ð½ |ÐšÐ¾Ð³Ð°Ñ‚Ð¾ |ÐšÐ°Ð´Ð° |ÐšÐ°Ð´ |Ðš Ñ‚Ð¾Ð¼Ñƒ Ð¶Ðµ |Ð˜ |Ð—Ð°Ð´Ð°Ñ‚Ð¾ |Ð—Ð°Ð´Ð°Ñ‚Ð¸ |Ð—Ð°Ð´Ð°Ñ‚Ðµ |Ð•ÑÐ»Ð¸ |Ð”Ð¾Ð¿ÑƒÑÑ‚Ð¸Ð¼ |Ð”Ð°Ð´ÐµÐ½Ð¾ |Ð’Ð° |Ð‘Ð¸Ñ€Ð¾Ðº |ÐÐ¼Ð¼Ð¾ |ÐÐ»Ð¸ |ÐÐ»Ðµ |ÐÐ³Ð°Ñ€ |Ð |Ð† |È˜i |Ã‰s |Zatati |ZakÅ‚adajÄ…c |Zadato |Zadate |Zadano |Zadani |Zadan |Youse know when youse got |Youse know like when |Yna |Ya know how |Ya gotta |Y |Wun |Wtedy |When y\'all |When |Wenn |WEN |VÃ&nbsp; |Ve |Und |Un |ThÃ¬ |Then y\'all |Then |Tapi |Tak |Tada |Tad |SÃ¥ |Stel |Soit |Siis |Si |Sed |Se |Quando |Quand |Quan |Pryd |Pokud |PokiaÄ¾ |PerÃ² |Pero |Pak |Oraz |Onda |Ond |Oletetaan |Og |Och |O zaman |NÃ¥r |NÃ¤r |Niin |NhÆ°ng |N |Mutta |Men |Mas |Maka |Majd |Mais |Maar |Ma |Lorsque |Lorsqu\'|Kun |Kuid |Kui |Khi |KeÄ |Ketika |KdyÅ¾ |Kaj |Kai |Kada |Kad |JeÅ¼eli |Ja |Ir |I CAN HAZ |I |Ha |Givun |Givet |Given y\'all |Given |Gitt |Gegeven |Gegeben sei |Fakat |EÄŸer ki |Etant donnÃ© |Et |EntÃ£o |Entonces |Entao |En |Eeldades |E |Duota |Dun |DonitaÄµo |Donat |Donada |Do |Diyelim ki |Dengan |Den youse gotta |De |Dato |Dar |Dann |Dan |Dado |DacÄƒ |Daca |DEN |CÃ¢nd |Cuando |Cho |Cept |Cand |Cal |But y\'all |But |Buh |Biáº¿t |Bet |BUT |AtÃ¨s |Atunci |Atesa |Anrhegedig a |Angenommen |And y\'all |And |An |Ama |Als |Alors |Allora |Ali |Aleshores |Ale |Akkor |Aber |AN |A takÃ© |A |\\* )'

    tokens = {
        'comments': [
            (r'^\s*#.*$', Comment),
        ],
        'feature_elements': [
            (step_keywords, Keyword, "step_content_stack"),
            include('comments'),
            (r"(\s|.)", Name.Function),
        ],
        'feature_elements_on_stack': [
            (step_keywords, Keyword, "#pop:2"),
            include('comments'),
            (r"(\s|.)", Name.Function),
        ],
        'examples_table': [
            (r"\s+\|", Keyword, 'examples_table_header'),
            include('comments'),
            (r"(\s|.)", Name.Function),
        ],
        'examples_table_header': [
            (r"\s+\|\s*$", Keyword, "#pop:2"),
            include('comments'),
            (r"\\\|", Name.Variable),
            (r"\s*\|", Keyword),
            (r"[^|]", Name.Variable),
        ],
        'scenario_sections_on_stack': [
            (feature_element_keywords,
             bygroups(Name.Function, Keyword, Keyword, Name.Function),
             "feature_elements_on_stack"),
        ],
        'narrative': [
            include('scenario_sections_on_stack'),
            include('comments'),
            (r"(\s|.)", Name.Function),
        ],
        'table_vars': [
            (r'(&lt;[^&gt;]+&gt;)', Name.Variable),
        ],
        'numbers': [
            (r'(\d+\.?\d*|\d*\.\d+)([eE][+-]?[0-9]+)?', String),
        ],
        'string': [
            include('table_vars'),
            (r'(\s|.)', String),
        ],
        'py_string': [
            (r'"""', Keyword, "#pop"),
            include('string'),
        ],
        'step_content_root': [
            (r"$", Keyword, "#pop"),
            include('step_content'),
        ],
        'step_content_stack': [
            (r"$", Keyword, "#pop:2"),
            include('step_content'),
        ],
        'step_content': [
            (r'"', Name.Function, "double_string"),
            include('table_vars'),
            include('numbers'),
            include('comments'),
            (r'(\s|.)', Name.Function),
        ],
        'table_content': [
            (r"\s+\|\s*$", Keyword, "#pop"),
            include('comments'),
            (r"\\\|", String),
            (r"\s*\|", Keyword),
            include('string'),
        ],
        'double_string': [
            (r'"', Name.Function, "#pop"),
            include('string'),
        ],
        'root': [
            (r'\n', Name.Function),
            include('comments'),
            (r'"""', Keyword, "py_string"),
            (r'\s+\|', Keyword, 'table_content'),
            (r'"', Name.Function, "double_string"),
            include('table_vars'),
            include('numbers'),
            (r'(\s*)(@[^@\r\n\t ]+)', bygroups(Name.Function, Name.Tag)),
            (step_keywords, bygroups(Name.Function, Keyword),
             'step_content_root'),
            (feature_keywords, bygroups(Keyword, Keyword, Name.Function),
             'narrative'),
            (feature_element_keywords,
             bygroups(Name.Function, Keyword, Keyword, Name.Function),
             'feature_elements'),
            (examples_keywords,
             bygroups(Name.Function, Keyword, Keyword, Name.Function),
             'examples_table'),
            (r'(\s|.)', Name.Function),
        ]
    }

    def analyse_text(self, text):
        return


class TAPLexer(RegexLexer):
    """
    For Test Anything Protocol (TAP) output.
    """
    name = 'TAP'
    url = 'https://testanything.org/'
    aliases = ['tap']
    filenames = ['*.tap']
    version_added = '2.1'

    tokens = {
        'root': [
            # A TAP version may be specified.
            (r'^TAP version \d+\n', Name.Namespace),

            # Specify a plan with a plan line.
            (r'^1\.\.\d+', Keyword.Declaration, 'plan'),

            # A test failure
            (r'^(not ok)([^\S\n]*)(\d*)',
             bygroups(Generic.Error, Text, Number.Integer), 'test'),

            # A test success
            (r'^(ok)([^\S\n]*)(\d*)',
             bygroups(Keyword.Reserved, Text, Number.Integer), 'test'),

            # Diagnostics start with a hash.
            (r'^#.*\n', Comment),

            # TAP's version of an abort statement.
            (r'^Bail out!.*\n', Generic.Error),

            # TAP ignores any unrecognized lines.
            (r'^.*\n', Text),
        ],
        'plan': [
            # Consume whitespace (but not newline).
            (r'[^\S\n]+', Text),

            # A plan may have a directive with it.
            (r'#', Comment, 'directive'),

            # Or it could just end.
            (r'\n', Comment, '#pop'),

            # Anything else is wrong.
            (r'.*\n', Generic.Error, '#pop'),
        ],
        'test': [
            # Consume whitespace (but not newline).
            (r'[^\S\n]+', Text),

            # A test may have a directive with it.
            (r'#', Comment, 'directive'),

            (r'\S+', Text),

            (r'\n', Text, '#pop'),
        ],
        'directive': [
            # Consume whitespace (but not newline).
            (r'[^\S\n]+', Comment),

            # Extract todo items.
            (r'(?i)\bTODO\b', Comment.Preproc),

            # Extract skip items.
            (r'(?i)\bSKIP\S*', Comment.Preproc),

            (r'\S+', Comment),

            (r'\n', Comment, '#pop:2'),
        ],
    }
</pre></body></html>