2017-07-21 12:44:36 +02:00
|
|
|
# Copyright 2007 Baptiste Lepilleur and The JsonCpp Authors
|
2015-04-10 03:01:33 +02:00
|
|
|
# Distributed under MIT license, or public domain if desired and
|
|
|
|
# recognized in your jurisdiction.
|
|
|
|
# See file LICENSE for detail or copy at http://jsoncpp.sourceforge.net/LICENSE
|
|
|
|
|
2014-11-20 06:30:47 +01:00
|
|
|
from __future__ import print_function
|
2007-06-14 23:01:26 +02:00
|
|
|
import glob
|
|
|
|
import os.path
|
2015-01-24 22:29:52 +01:00
|
|
|
for path in glob.glob('*.json'):
|
2007-06-14 23:01:26 +02:00
|
|
|
text = file(path,'rt').read()
|
|
|
|
target = os.path.splitext(path)[0] + '.expected'
|
2015-01-24 22:29:52 +01:00
|
|
|
if os.path.exists(target):
|
2014-11-20 06:30:47 +01:00
|
|
|
print('skipping:', target)
|
2007-06-14 23:01:26 +02:00
|
|
|
else:
|
2014-11-20 06:30:47 +01:00
|
|
|
print('creating:', target)
|
2007-06-14 23:01:26 +02:00
|
|
|
file(target,'wt').write(text)
|
|
|
|
|