summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorMatthäus G. Chajdas <dev@anteru.net>2020-09-08 20:31:17 +0200
committerMatthäus G. Chajdas <dev@anteru.net>2020-09-08 20:31:17 +0200
commite09d4e0cf23d7c6069ddc690942ceb4cd23fd556 (patch)
treec2bb261ee7a0aa28f47a47cd74ed0834ea9b64db /tests
parent98f816ae5ca7d98f388ace349a29b154fa9dc9e1 (diff)
downloadpygments-git-e09d4e0cf23d7c6069ddc690942ceb4cd23fd556.tar.gz
Skip empty tokens in some cases.
This fixes an empty token appearing in the Angular lexer (and apparently also in the MSDOS lexer.)
Diffstat (limited to 'tests')
-rw-r--r--tests/test_shell.py1
-rw-r--r--tests/test_template.py1
2 files changed, 1 insertions, 1 deletions
diff --git a/tests/test_shell.py b/tests/test_shell.py
index 79f78b3a..79611f16 100644
--- a/tests/test_shell.py
+++ b/tests/test_shell.py
@@ -162,7 +162,6 @@ def test_msdos_gt_only(lexer_msdos):
(Token.Generic.Prompt, u'>'),
(Token.Text, u' '),
(Token.Text, u'py'),
- (Token.Text, u''),
(Token.Text, u'\n'),
(Token.Generic.Output, u'hi\n'),
]
diff --git a/tests/test_template.py b/tests/test_template.py
index 48226f62..9ae87171 100644
--- a/tests/test_template.py
+++ b/tests/test_template.py
@@ -23,5 +23,6 @@ def testAngularFragment(lexer_ng2):
(Token.Punctuation, '*'),
(Token.Name.Attribute, '39j5Sq'),
(Token.Operator, '='),
+ (Token.Text, '\n')
]
assert list(lexer_ng2.get_tokens(fragment)) == tokens \ No newline at end of file