blob: e049ab5f4d123363f0eccef749bf4a8a420de253 [file] [log] [blame]
Devin Jeanpierre59e4d352017-07-21 03:44:36 -07001# Copyright 2007 Baptiste Lepilleur and 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