@Test
public void testWindowsFilePatternMatcherForFileAndLineNumberError() {

  int lineNumber = 123;
  int columnNumber = 456;
  String filePath = "C:\\Path\\to\\file.type";
  String error = "%s:%d:%d";
  error = String.format(Locale.getDefault(), error, filePath, lineNumber, columnNumber);
  Matcher matcher = CmakeOutputParser.fileAndLineNumber.matcher(error);
  assertTrue("[match file path]", matcher.matches());
  String matchedPath = matcher.group(1);
  CmakeOutputParser.ErrorFields fields =
    CmakeOutputParser.matchFileAndLineNumberErrorParts(matcher, error);
  assertEquals("[source path]", filePath.trim(), matchedPath);
  assertEquals("[line number]", lineNumber, fields.lineNumber);
  assertEquals("[column number]", columnNumber, fields.columnNumber);
}