I'm creating a console calculator-application of Roman numbers, as a practice, and using Java, Spring Shell 3.1.2. Right now it works correctly with Roman numbers like:
calc "V + V"
result: X
calc "V * V"
result: XXV
Since Roman numbers have no such thing as negative values, I would like to show the user a notification about this if he tries to enter a command:
calc "-V * V"
result: Roman numerals must be positive.
I've already created all the necessary logic in the code, through parsing and exceptions. However, I faced with another problem when checking how it works. I'm trying to write something like to the console myself, and the problem is:
calc "-V * V"
result:
2001E:(pos 0): Unrecognised option '-V * V'
2000E:(pos 0): Missing mandatory option, longnames='expression', shortnames=''
I've tried various input options in the console, such as using the characters '-V*V'
instead of '-V*V'
, missing characters and all that, but it doesn't help. The only thing that changes the situation at least a little is a similar input option: calc "V * -V"
Can you recommend me something? Is it possible somehow to turn-off flags option in the Spring Shell application?