blob: 4d56bce737ac149ea4292e300dc7012c37571869 [file] [log] [blame]
Devin Jeanpierre19fc55f2017-04-24 10:49:00 -07001# Copyright 2007 The JsonCpp Authors
Sam Clegg63860612015-04-09 18:01:33 -07002# Distributed under MIT license, or public domain if desired and
3# recognized in your jurisdiction.
4# See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
5
Christopher Dunnbd1e8952014-11-19 23:30:47 -06006from __future__ import print_function
Christopher Dunnf9864232007-06-14 21:01:26 +00007import glob
8import os.path
Christopher Dunn494950a2015-01-24 15:29:52 -06009for path in glob.glob('*.json'):
Christopher Dunnf9864232007-06-14 21:01:26 +000010 text = file(path,'rt').read()
11 target = os.path.splitext(path)[0] + '.expected'
Christopher Dunn494950a2015-01-24 15:29:52 -060012 if os.path.exists(target):
Christopher Dunnbd1e8952014-11-19 23:30:47 -060013 print('skipping:', target)
Christopher Dunnf9864232007-06-14 21:01:26 +000014 else:
Christopher Dunnbd1e8952014-11-19 23:30:47 -060015 print('creating:', target)
Christopher Dunnf9864232007-06-14 21:01:26 +000016 file(target,'wt').write(text)
17