1# -*- coding: utf-8 -*-
2"""
3    Whiley Test
4    ~~~~~~~~~~~
5
6    :copyright: Copyright 2006-2020 by the Pygments team, see AUTHORS.
7    :license: BSD, see LICENSE for details.
8"""
9
10import pytest
11
12from pygments.lexers import WhileyLexer
13from pygments.token import Token
14
15
16@pytest.fixture(scope='module')
17def lexer():
18    yield WhileyLexer()
19
20
21def test_whiley_operator(lexer):
22    fragment = '123 \u2200 x\n'
23    tokens = [
24        (Token.Literal.Number.Integer, '123'),
25        (Token.Text, ' '),
26        (Token.Operator, '\u2200'),
27        (Token.Text, ' '),
28        (Token.Name, 'x'),
29        (Token.Text, '\n'),
30    ]
31    assert list(lexer.get_tokens(fragment)) == tokens
32