summaryrefslogtreecommitdiff
path: root/tests/test_basic_api.py
diff options
context:
space:
mode:
authorTim Van Steenburgh <tvansteenburgh@gmail.com>2011-05-26 16:09:37 -0400
committerTim Van Steenburgh <tvansteenburgh@gmail.com>2011-05-26 16:09:37 -0400
commitb8ab0806c54074c60fd005cf07777f65e8f8dd2c (patch)
treea7f70b7141d431fb4ea189ba5385bc1f60e56df2 /tests/test_basic_api.py
parenteba3cc135dc5fd38b65f9f6ae786d431324d5f35 (diff)
downloadpygments-b8ab0806c54074c60fd005cf07777f65e8f8dd2c.tar.gz
Fix bug in GasLexer.analyse_text(). Make sure return val can be cast to float.
Diffstat (limited to 'tests/test_basic_api.py')
-rw-r--r--tests/test_basic_api.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/test_basic_api.py b/tests/test_basic_api.py
index 1e7dff14..a90d0a83 100644
--- a/tests/test_basic_api.py
+++ b/tests/test_basic_api.py
@@ -42,6 +42,8 @@ def test_lexer_classes():
"%s: %s attribute wrong" % (cls, attr)
result = cls.analyse_text("abc")
assert isinstance(result, float) and 0.0 <= result <= 1.0
+ result = cls.analyse_text(".abc")
+ assert isinstance(result, float) and 0.0 <= result <= 1.0
inst = cls(opt1="val1", opt2="val2")
if issubclass(cls, RegexLexer):