1## keep two lines free to make sure PEP 263 does not apply
2##
3
4##
5
6# This file is written in UTF-8, but it has no encoding declaration,
7# so it just defaults to UTF-8 (PEP 3120).
8
9__doc__ = br"""
10    >>> sa
11    'abc'
12    >>> ua
13    u'abc'
14    >>> b
15    u'123'
16    >>> c
17    u'S\xf8k ik'
18    >>> d
19    u'\xfc\xd6\xe4'
20    >>> e
21    u'\x03g\xf8\uf8d2S\xf8k ik'
22    >>> f
23    u'\xf8'
24    >>> add
25    u'S\xf8k ik\xfc\xd6\xe4abc'
26    >>> null
27    u'\x00'
28""".decode("ASCII") + b"""
29    >>> len(sa)
30    3
31    >>> len(ua)
32    3
33    >>> len(b)
34    3
35    >>> len(c)
36    6
37    >>> len(d)
38    3
39    >>> len(e)
40    10
41    >>> len(f)
42    1
43    >>> len(add)
44    12
45    >>> len(null)
46    1
47""".decode("ASCII") + u"""
48    >>> ua == u'abc'
49    True
50    >>> b == u'123'
51    True
52    >>> c == u'Søk ik'
53    True
54    >>> d == u'üÖä'
55    True
56    >>> e == u'\x03\x67\xf8\uf8d2Søk ik'     # unescaped by Cython
57    True
58    >>> e == u'\\x03\\x67\\xf8\\uf8d2Søk ik' # unescaped by Python
59    True
60    >>> f == u'\xf8'  # unescaped by Cython
61    True
62    >>> f == u'\\xf8' # unescaped by Python
63    True
64    >>> add == u'Søk ik' + u'üÖä' + 'abc'
65    True
66    >>> null == u'\\x00' # unescaped by Python (required by doctest)
67    True
68"""
69
70import sys
71if sys.version_info[0] >= 3:
72    __doc__ = __doc__.replace(u" u'", u" '")
73else:
74    __doc__ = __doc__.replace(u" b'", u" '")
75
76sa = 'abc'
77ua = u'abc'
78
79b = u'123'
80c = u'Søk ik'
81d = u'üÖä'
82e = u'\x03\x67\xf8\uf8d2Søk ik'
83f = u'\xf8'
84
85add = u'Søk ik' + u'üÖä' + u'abc'
86null = u'\x00'
87