summaryrefslogtreecommitdiff
path: root/python/testData/highlighting/unicodeOrByte26future.py
blob: f87b74e588aa49c53a4bb6028b6ef3ee0744cee7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
from __future__ import unicode_literals

z = (
    <info descr="null">"simple"</info>
    <info descr="null">"escaped <info descr="null">\u1234</info> correct"</info>
    <info descr="null">"escaped <error descr="Invalid escape sequence">\u123z</error> incorrect"</info>
    <info descr="null">"escaped <info descr="null">\U12345678</info> correct"</info>
    <info descr="null">"escaped <error descr="Invalid escape sequence">\U1234567 </error> too short"</info>
    <info descr="null">"hex <info descr="null">\x12</info> correct"</info>
    <info descr="null">"hex <error descr="Invalid escape sequence">\x1z</error> incorrect"</info>
    <info descr="null">"named <info descr="null">\N{comma}</info> correct"</info>
    <info descr="null">"named <error descr="Invalid escape sequence">\N</error>{123} incorrect, not a name"</info>
    <info descr="null">"named <error descr="Invalid escape sequence">\N{foo</error>, incorrect"</info>
    <info descr="null">"named incomplete <error descr="Invalid escape sequence">\N{aa</error>"</info>
    #"lone backslash \"
)
z = b"hex <info descr="null">\x12</info> correct"
z = b"hex <info descr="null">\x12</info>3 correct"
z = b"hex <error descr="Invalid escape sequence">\x1z</error> incorrect"
z = b"hex incomplete<error descr="Invalid escape sequence">\x</error>"
z = b"hex incomplete<error descr="Invalid escape sequence">\x1</error>"
z = b"one char <info descr="null">\n</info> correct"
z = b"one char \Q ignored"
z = b"octal <info descr="null">\007</info> correct"
z = b"octal <info descr="null">\27</info> correct"
z = b"octal <info descr="null">\7</info> correct"
z = b"octal <info descr="null">\00</info>8 deceptively correct"
z = b"non-octal \986 ignored"