| 1 |
"""Test file for syntax highlighting of editors. |
| 2 |
|
| 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). |
| 6 |
|
| 7 |
Extraneous trailing whitespace can't be tested because of svn pre-commit hook |
| 8 |
checks for such things. |
| 9 |
|
| 10 |
""" |
| 11 |
|
| 12 |
|
| 13 |
|
| 14 |
|
| 15 |
from __future__ import with_statement |
| 16 |
from sys import path as thing |
| 17 |
assert True |
| 18 |
def foo(): |
| 19 |
return [] |
| 20 |
class Bar(object): |
| 21 |
def __enter__(self): |
| 22 |
pass |
| 23 |
def __exit__(self, *args): |
| 24 |
pass |
| 25 |
foo() |
| 26 |
while False: |
| 27 |
continue |
| 28 |
for x in foo(): |
| 29 |
break |
| 30 |
with Bar() as stuff: |
| 31 |
pass |
| 32 |
if False: pass |
| 33 |
elif False: pass |
| 34 |
else: pass |
| 35 |
|
| 36 |
|
| 37 |
'single-quote', u'unicode' |
| 38 |
"double-quote" |
| 39 |
"""triple double-quote""" |
| 40 |
'''triple single-quote''' |
| 41 |
r'raw' |
| 42 |
ur'unicode raw' |
| 43 |
'escape\n' |
| 44 |
'\04' |
| 45 |
'\xFF' |
| 46 |
'\u1111' |
| 47 |
1 |
| 48 |
1L |
| 49 |
1.0 |
| 50 |
.1 |
| 51 |
1+2j |
| 52 |
|
| 53 |
|
| 54 |
1 and 2 or 3 |
| 55 |
2 < 3 |
| 56 |
spam = 42 |
| 57 |
2 + 3 |
| 58 |
[] |
| 59 |
{} |
| 60 |
(1,) |
| 61 |
all |
| 62 |
GeneratorExit |