bpo-33204: IDLE - revise and extend colorizer test. (GH-6347) · python/cpython@306559e
@@ -262,9 +262,12 @@ def _color_delegator(parent): # htest #
262262top.title("Test ColorDelegator")
263263x, y = map(int, parent.geometry().split('+')[1:])
264264top.geometry("700x250+%d+%d" % (x + 20, y + 175))
265-source = ("# Following has syntax errors\n"
266-"if True: then int 1\nelif False: print 0\nelse: float(None)\n"
267-"if iF + If + IF: 'keywork matching must respect case'\n"
265+source = (
266+"if True: int ('1') # keyword, builtin, string, comment\n"
267+"elif False: print(0)\n"
268+"else: float(None)\n"
269+"if iF + If + IF: 'keyword matching must respect case'\n"
270+"if'': x or'' # valid string-keyword no-space combinations\n"
268271"# All valid prefixes for unicode and byte strings should be colored.\n"
269272"'x', '''x''', \"x\", \"\"\"x\"\"\"\n"
270273"r'x', u'x', R'x', U'x', f'x', F'x'\n"