nodeca/argparse — pull request #33 by hpaulj (2013-01-04 08:01:38+00:00)
Title: This argparse failed the test_argparse.py TestOptionLike class

I have translated many of the test classes in test_argparse.py to mocha, and encountered errors in about 17 of these classes. The tests all specify ArgumentParser(), addArgument(), and parseArgs() without defining special functions.

This is the first of 6 changes need to make js argparse pass the Python tests.

Args like '-x -2.5 a' are supposed to fail.
The problem is that Python match() starts the match at the start of a string.
Javascript match can match anywhere in the string.
Correction in argument_parser.js, matchArguments() and matchArgumentsPartial()
is to add '^' to the pattern.

TestOptionLike.js tests the change in matchArguments(). I don't know of a test
for the matchArgumentsPartial() change.