fix missing and extra patch_minor in ua tests#579
fix missing and extra patch_minor in ua tests#579lbarthon merged 1 commit intoua-parser:masterfrom masklinn:fix-patch-minor-ua-tests
patch_minor in ua tests#579Conversation
`patch_minor` was added to regexes and some test_ua entries in #322. Neither spec nor reference implementation were ever updated for it, so many regexes were merged (?) with a capture for `patch_minor` but without correctly asserting it, and a pair of cases specify a `patch_minor` which is not captured: - the facebook regex[^1] only has 4 capturing groups - same for the AWS regex[^2] [^1]: https://github.com/ua-parser/uap-core/blob/959e106754828ae557b0dbcfaf8eeee938d3c824/regexes.yaml#L176 [^2]: https://github.com/ua-parser/uap-core/blob/959e106754828ae557b0dbcfaf8eeee938d3c824/regexes.yaml#L155
|
Should we assert the key is present on all tests? Or at least for those where it's not empty. |
I'm not sure I quite understand the question. This PR should have filled in all the entries where the regex has a 5th capturing group (so So all the entries with an unspecified Also this PR should probably be linked to #562, I'd completely forgotten I'd reported that issue but hadn't had the time to work on it. |
patch_minorwas added to regexes and some test_ua entries in #322.Neither spec nor reference implementation were ever updated for it, so many regexes were merged (?) with a capture for
patch_minorbut without correctly asserting it, and a pair of cases specify apatch_minorwhich is not captured:Footnotes
https://github.com/ua-parser/uap-core/blob/959e106754828ae557b0dbcfaf8eeee938d3c824/regexes.yaml#L176 ↩
https://github.com/ua-parser/uap-core/blob/959e106754828ae557b0dbcfaf8eeee938d3c824/regexes.yaml#L155 ↩