Haibo Huang | b0bee82 | 2021-02-24 15:40:15 -0800 | [diff] [blame] | 1 | # 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 Sollenberger | 2eb3b4d | 2016-01-11 14:41:40 -0500 | [diff] [blame] | 6 | from __future__ import print_function |
| 7 | import glob |
| 8 | import os.path |
Haibo Huang | b0bee82 | 2021-02-24 15:40:15 -0800 | [diff] [blame] | 9 | for path in glob.glob('*.json'): |
Derek Sollenberger | 2eb3b4d | 2016-01-11 14:41:40 -0500 | [diff] [blame] | 10 | text = file(path,'rt').read() |
| 11 | target = os.path.splitext(path)[0] + '.expected' |
Haibo Huang | b0bee82 | 2021-02-24 15:40:15 -0800 | [diff] [blame] | 12 | if os.path.exists(target): |
Derek Sollenberger | 2eb3b4d | 2016-01-11 14:41:40 -0500 | [diff] [blame] | 13 | print('skipping:', target) |
| 14 | else: |
| 15 | print('creating:', target) |
| 16 | file(target,'wt').write(text) |
| 17 | |