Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This modifies two existing test cases to include an assertion about the length. These test cases are retained as there is value in testing on output from a real git command rather than only with test doubles. More importantly, this also adds a parameterized test method to check parsing of: - All numeric, shorter than the limit - all fields used. - All numeric, at the limit - all fields used. - All numeric, longer than the limit - extra fields dropped. - Has unambiguous non-numeric - dropped from there on. - Has ambiguous non-numeric, negative int - dropped from there on. - Has ambiguous non-numeric, number+letter - dropped from there on. The cases for parsing when a field is not numeric (or not fully or unambiguously numeric) currently all fail, because the existing logic drops intermediate non-numeric fields (#1833). Parsing should instead stop at (or, *perhaps* in cases like "2a", after) such fields. When the code is changed to stop at them rather than dropping them and presenting the subsequent field as though it were a previous field, these test cases should also pass.
- Loading branch information