[Chapel Merge] This PR updates the argument parser to handle nega

Branch: refs/heads/main
Revision: 36673d7
Author: arezaii
Log Message:

Merge pull request #18395 from arezaii/argparse-handle-negatives

This PR updates the argument parser to handle negative numbers as values in options.

Previously, the _match method for Options was looking for a leading dash - as an exit
condition. This change removes that check and will now consume values with leading
dashes.

TESTING:

After running make cleanall from $CHPL_HOME:

  • [x] Can make
  • [x] Can make docs
  • [x] Can make mason
  • [x] Can make check
  • [x] Passing tests from util/start_test test/mason/
  • [x] Passing tests from util/start_test test/library/packages/ArgumentParser/

Reviewed by @mppf - thanks!

Signed-off-by: arezaii ahmad.rezaii@hpe.com

Modified Files:
M modules/packages/ArgumentParser.chpl

M test/library/packages/ArgumentParser/ArgumentParserTests.chpl
M test/library/packages/ArgumentParser/ArgumentParserTests.good

Compare: https://github.com/chapel-lang/chapel/compare/937aee52b67f...36673d720d32