mirror of
https://github.com/python/cpython.git
synced 2025-10-09 08:31:26 +00:00
bpo-33204: IDLE - revise and extend colorizer test. (GH-6347)
Followup to primary PR for the issue, GH-6344.
This commit is contained in:
parent
da58533ac6
commit
55966f3a0d
2 changed files with 8 additions and 5 deletions
|
@ -262,9 +262,12 @@ def _color_delegator(parent): # htest #
|
|||
top.title("Test ColorDelegator")
|
||||
x, y = map(int, parent.geometry().split('+')[1:])
|
||||
top.geometry("700x250+%d+%d" % (x + 20, y + 175))
|
||||
source = ("# Following has syntax errors\n"
|
||||
"if True: then int 1\nelif False: print 0\nelse: float(None)\n"
|
||||
"if iF + If + IF: 'keywork matching must respect case'\n"
|
||||
source = (
|
||||
"if True: int ('1') # keyword, builtin, string, comment\n"
|
||||
"elif False: print(0)\n"
|
||||
"else: float(None)\n"
|
||||
"if iF + If + IF: 'keyword matching must respect case'\n"
|
||||
"if'': x or'' # valid string-keyword no-space combinations\n"
|
||||
"# All valid prefixes for unicode and byte strings should be colored.\n"
|
||||
"'x', '''x''', \"x\", \"\"\"x\"\"\"\n"
|
||||
"r'x', u'x', R'x', U'x', f'x', F'x'\n"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue