final String perlStyleRegex = "/mozilla.*rv:[0-9\\.]+.*gecko\\/[0-9]+.*firefox\\/([0-9a-z\\+\\-\\.]+).*swiftfox/si";
RegularExpressionConverter.convertPerlRegexToPattern(perlStyleRegex);
final Pattern pattern = RegularExpressionConverter.convertPerlRegexToPattern(perlStyleRegex, true);
final Pattern expected = Pattern.compile("mozilla.*rv:[0-9\\.]+.*gecko\\/[0-9]+.*firefox\\/([0-9a-z\\+\\-\\.]+).*swiftfox",
Pattern.CASE_INSENSITIVE | Pattern.DOTALL);
assertThat(pattern.flags()).isEqualTo(expected.flags());
}
@Test
public void giveMeCoverageForMyPrivateConstructor() throws Exception {
// reduces only some noise in coverage report