Add test for last while1 bug fix

This commit is contained in:
rocky
2017-02-20 09:15:39 -05:00
parent 747212c62c
commit aa207a3c77
2 changed files with 14 additions and 0 deletions

Binary file not shown.

View File

@@ -0,0 +1,14 @@
# From Python 3.4 mailcap
def readmailcapfile(caps):
while 1:
line = 'abc'
if line[0] == '#' or line == '':
continue
key, fields = (1,2)
if not (key and fields):
continue
if key in caps:
caps[key].append(fields)
else:
caps[key] = [fields]
return caps