summaryrefslogtreecommitdiff
path: root/tests/test_asm.py
blob: 30a008a1517a7c933ffed1f076b9fc16889379e1 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
# -*- coding: utf-8 -*-
"""
    Basic ColdfusionHtmlLexer Test
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

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

import unittest
import os

from pygments.token import Token
from pygments.lexers import NasmLexer


class NasmLexerTest(unittest.TestCase):

    def setUp(self):
        self.lexer = NasmLexer()

    def testCPUID(self):
        # CPU is a valid directive, and we don't want to parse this as
        # cpu id, but as a single token. See bug #1517
        fragment = 'cpuid'
        expected = [
            (Token.Name.Function, u'cpuid'),
            (Token.Text, u'\n'),
        ]
        self.assertEqual(expected, list(self.lexer.get_tokens(fragment)))