tobie/ua-parser — pull request #378 by somechris (2014-04-16 18:54:02+00:00)
Title: Enable $1 replacement within Java parser

Tests for the java parser were failing, as "Windows $1" was reported
as OS in some tests instead of "Windows NT" [1]. We fix those tests by
implementing the $1 replacement akin to the Python parser.

[1]

[...]
Running ua_parser.ParserTest
Tests run: 9, Failures: 1, Errors: 0, Skipped: 0, Time elapsed: 5.151 sec <<< FAILURE!
Running ua_parser.UserAgentTest
Tests run: 3, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.017 sec
Running ua_parser.CachingParserTest
Tests run: 17, Failures: 2, Errors: 0, Skipped: 0, Time elapsed: 18.909 sec <<< FAILURE!

Results :

Failed tests: testParseOS(ua_parser.ParserTest): Mozilla/5.0 (Windows U; Win NT 5.0; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2
testCachedParseOS(ua_parser.CachingParserTest): Mozilla/5.0 (Windows U; Win NT 5.0; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2
testParseOS(ua_parser.CachingParserTest): Mozilla/5.0 (Windows U; Win NT 5.0; en-US; rv:1.8.0.2) Gecko/20060308 Firefox/1.5.0.2