Fix --postarg and add option --preproc-show-cmdline + unit test
Thanks to @Blues-Today for reporting that --postarg was not working. This needed a regression test, and the best way to distinguish --prearg from --postarg is to display the full preprocessor command line, therefore a new option was added for that purpose: --preproc-show-cmdline Fixes #18.
This commit is contained in:
1
unit_tests/preproc.suite/option-passing.out
Normal file
1
unit_tests/preproc.suite/option-passing.out
Normal file
@@ -0,0 +1 @@
|
||||
cpp --prefix-test-1 --prefix-test-2 -undef -x c -std=c99 -nostdinc -trigraphs -dN -fno-extended-identifiers -Dinteger(...)=((integer)(__VA_ARGS__)) -Dfloat(...)=((float)(__VA_ARGS__)) -Dstring(...)=((string)(__VA_ARGS__)) -Dkey(...)=((key)(__VA_ARGS__)) -Drotation(...)=((rotation)(__VA_ARGS__)) -Dquaternion(...)=((quaternion)(__VA_ARGS__)) -Dvector(...)=((vector)(__VA_ARGS__)) -Dlist(...)=((list)(__VA_ARGS__)) -D__AGENTKEY__="00000000-0000-0000-0000-000000000000" -D__AGENTID__="00000000-0000-0000-0000-000000000000" -D__AGENTIDRAW__=00000000-0000-0000-0000-000000000000 -D__AGENTNAME__="" -D__ASSETID__=00000000-0000-0000-0000-000000000000 -D__SHORTFILE__="" -D__OPTIMIZER__=LSL-PyOptimizer -D__OPTIMIZER_VERSION__=0.3.0beta --suffix-test-1 --suffix-test-2
|
||||
8
unit_tests/preproc.suite/option-passing.run
Normal file
8
unit_tests/preproc.suite/option-passing.run
Normal file
@@ -0,0 +1,8 @@
|
||||
main.py -y -O clear,processpre \
|
||||
-p gcpp \
|
||||
--preproc-show-cmdline \
|
||||
-P --prefix-test-1 \
|
||||
-A --suffix-test-1 \
|
||||
--prearg=--prefix-test-2 \
|
||||
--postarg=--suffix-test-2 \
|
||||
-
|
||||
Reference in New Issue
Block a user