mirror of
https://github.com/cappuccino/cappuccino.git
synced 2026-09-07 03:07:12 +00:00
Without this fix, CPDecimal will return NaN for numbers that have leading zeros, e.g., 0123. This fix changes the matching regex to allow leading zeros to pass. This is then converted to a proper number later on, e.g., "0123" => 123. This is in line with Cocoa behaviour. This commit also includes updated unit tests.
Requires objj be installed, as well as ojunit, located at http://github.com/cappuccino/ojunit
Run individual tests using a command similar to the following:
objj ojunit/OJTestRunnerText.j cappuccino/Tests/Foundation/CPDateTest.j