It was looking at switching to use Lyra from an existing command line handling routine and found that negative values on the command line are not handled consistently.
Using
Lyra\examples\doc_example1.cpp
as a test I found that negative values only work if you use '=', with either the short or long options.
"doc_example -w 32" works but "doc_example -w -32" fails
The following Windows batch file shows the passing and failing cases.
-----------------> Cut Here <----------------------
@echo off
@rem
@rem Test to show inconsistancy in handling of negative numbers
@rem
setlocal enableextensions
call :test -w 32
call :test -w -32
call :test -w=32
call :test -w=-32
call :test --width 32
call :test --width -32
call :test --width=32
call :test --width=-32
goto :EOF
:test
@rem echo Test doc_example1 %*
doc_example1 %* > nul: 2>&1
if errorlevel 1 (
echo *FAIL*: doc_example1 %*
) else (
echo Pass: doc_example1 %*
)
goto :EOF
-----------------> Cut Here <----------------------
It was looking at switching to use Lyra from an existing command line handling routine and found that negative values on the command line are not handled consistently.
Using
Lyra\examples\doc_example1.cpp
as a test I found that negative values only work if you use '=', with either the short or long options.
"doc_example -w 32" works but "doc_example -w -32" fails
The following Windows batch file shows the passing and failing cases.
-----------------> Cut Here <----------------------
-----------------> Cut Here <----------------------