1 """Test file for syntax highlighting of editors.
3 Meant to cover a wide range of different types of statements and expressions.
4 Not necessarily sensical or comprehensive (assume that if one exception is
5 highlighted that all are, for instance).
7 Extraneous trailing whitespace can't be tested because of svn pre-commit hook
8 checks for such things.
12 # OPTIONAL: XXX catch your attention
15 from __future__
import with_statement
# Import
16 from sys
import path
as thing
18 def foo(): # function definition
20 class Bar(object): # Class definition
23 def __exit__(self
, *args
):
25 foo() # UNCOLOURED: function call
26 while False: # 'while'
28 for x
in foo(): # 'for'
37 'single-quote', u
'unicode' # Strings of all kinds; prefixes not highlighted
39 """triple double-quote"""
40 '''triple single-quote'''
46 '\u1111' # unicode character
54 1 and 2 or 3 # Boolean operators
55 2 < 3 # UNCOLOURED: comparison operators
56 spam
= 42 # UNCOLOURED: assignment
57 2 + 3 # UNCOLOURED: number operators
60 (1,) # UNCOLOURED: tuple
61 all
# Built-in functions
62 GeneratorExit
# Exceptions