blob: e049ab5f4d123363f0eccef749bf4a8a420de253 [file] [log] [blame]
Haibo Huangb0bee822021-02-24 15:40:15 -08001# Copyright 2007 Baptiste Lepilleur and The JsonCpp Authors
2# 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
Derek Sollenberger2eb3b4d2016-01-11 14:41:40 -05006from __future__ import print_function
7import glob
8import os.path
Haibo Huangb0bee822021-02-24 15:40:15 -08009for path in glob.glob('*.json'):
Derek Sollenberger2eb3b4d2016-01-11 14:41:40 -050010 text = file(path,'rt').read()
11 target = os.path.splitext(path)[0] + '.expected'
Haibo Huangb0bee822021-02-24 15:40:15 -080012 if os.path.exists(target):
Derek Sollenberger2eb3b4d2016-01-11 14:41:40 -050013 print('skipping:', target)
14 else:
15 print('creating:', target)
16 file(target,'wt').write(text)
17