smartt/jsmacro — pull request #12 by Skylark13 (2013-02-02 19:21:54+00:00)
Title: A few small additions.

Hi smartt, here are a few contributions I'd like to add to jsmacro. Good simple tool, thanks for working on it!

- Added usage for `-s|--srcdir` and `-d|--dstdir` into the `--help` output, it was not documented when those functionalities were added.
- Added a way to specify values of defines on the command line (i.e. `--def DEBUG=1`). Tested using `jsmacro.py -ftestfiles\basic-debug-false-in.js --def DEBUG=1 > test.js` and comparing `test.js` to `basic-debug-true-out.js`, they are the same indicating the `DEBUG=0` in the code was overridden by the `DEBUG=1` from the command line.
- Added `__file__` and `__line__` like in the C preprocessor. Also added tests for these. Implementation for the `__line__` macro is messy, please improve, my python is not quite as good as I'd like.
- Renamed the variable `save_expected_failures` to `save_failure_output` to clarify its purpose.
- Added stats of pass/fail at the end of `--test`.
- Save failure output or output EXPECTED and GOT only in the case of an actual failure, i.e. if (expecting a pass, got a fail) or (expecting a fail, got a pass).