blob: 0b74f51ceef65aa157529649b1dd0a82197f4e0f [file] [log] [blame]
Sam Clegg63860612015-04-09 18:01:33 -07001# Copyright 2007 Baptiste Lepilleur
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
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