diff options
| author | Oleh Prypin <oleh@pryp.in> | 2021-01-18 20:39:02 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-01-18 20:39:02 +0100 |
| commit | f0445be718da83541ea3401aad882f3937147263 (patch) | |
| tree | 26bd361a410d8bea33ce259321fad63e7f3c61af /tests/test_coffeescript.py | |
| parent | 423c44a451db7e5f63147b1c1519661d745fc43a (diff) | |
| download | pygments-git-f0445be718da83541ea3401aad882f3937147263.tar.gz | |
Replace tests that assert on token output with auto-updatable samples (#1649)
Diffstat (limited to 'tests/test_coffeescript.py')
| -rw-r--r-- | tests/test_coffeescript.py | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/tests/test_coffeescript.py b/tests/test_coffeescript.py index 5d69a8aa..56af6ba4 100644 --- a/tests/test_coffeescript.py +++ b/tests/test_coffeescript.py @@ -50,35 +50,3 @@ def test_coffee_slashes(lexer, golden): if '/' in s: is_regex = t is Token.String.Regex assert is_regex == slashes_are_regex_here, (t, s) - - -def test_mixed_slashes(lexer): - fragment = 'a?/foo/:1/2;\n' - tokens = [ - (Token.Name.Other, 'a'), - (Token.Operator, '?'), - (Token.Literal.String.Regex, '/foo/'), - (Token.Operator, ':'), - (Token.Literal.Number.Integer, '1'), - (Token.Operator, '/'), - (Token.Literal.Number.Integer, '2'), - (Token.Punctuation, ';'), - (Token.Text, '\n'), - ] - assert list(lexer.get_tokens(fragment)) == tokens - - -def test_beware_infinite_loop(lexer): - # This demonstrates the case that "This isn't really guarding" comment - # refers to. - fragment = '/a/x;\n' - tokens = [ - (Token.Text, ''), - (Token.Operator, '/'), - (Token.Name.Other, 'a'), - (Token.Operator, '/'), - (Token.Name.Other, 'x'), - (Token.Punctuation, ';'), - (Token.Text, '\n'), - ] - assert list(lexer.get_tokens(fragment)) == tokens |
