blob: 2bbf569c1dfdb9eca19b00ed4b183289302ebd19 [file] [log] [blame]
Christopher Dunnbd1e8952014-11-19 23:30:47 -06001from __future__ import print_function
Christopher Dunnf9864232007-06-14 21:01:26 +00002import glob
3import os.path
Christopher Dunn494950a2015-01-24 15:29:52 -06004for path in glob.glob('*.json'):
Christopher Dunnf9864232007-06-14 21:01:26 +00005 text = file(path,'rt').read()
6 target = os.path.splitext(path)[0] + '.expected'
Christopher Dunn494950a2015-01-24 15:29:52 -06007 if os.path.exists(target):
Christopher Dunnbd1e8952014-11-19 23:30:47 -06008 print('skipping:', target)
Christopher Dunnf9864232007-06-14 21:01:26 +00009 else:
Christopher Dunnbd1e8952014-11-19 23:30:47 -060010 print('creating:', target)
Christopher Dunnf9864232007-06-14 21:01:26 +000011 file(target,'wt').write(text)
12