Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
fixed regex issue
  • Loading branch information
ryaneberly committed Jul 28, 2017
1 parent c35d31e commit 9fd1344
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 12 deletions.
12 changes: 6 additions & 6 deletions src/test/java/com/cflint/integration/TestIntegrationFolder.java
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ public void testFolder() throws Exception{
final String expected = loadFile(new File("src/test/resources/com/cflint/integration/output.expected.json"));
final String actual = loadFile(new File("src/test/resources/com/cflint/integration/output.json"));
assertEquals(
expected.replaceAll("\\\\","/").replaceAll("/+","/").replaceAll("\r\n", "\n").replaceAll("\\s\"file\".+\n", ""),
actual.replaceAll("\\\\","/").replaceAll("/+","/").replaceAll("\r\n", "\n").replaceAll("\\s\"file\".+\n", ""));
expected.replaceAll("\\\\","/").replaceAll("/+","/").replaceAll("\\R", "\n").replaceAll("\"file\".+\\R\\s*", ""),
actual.replaceAll("\\\\","/").replaceAll("/+","/").replaceAll("\\R", "\n").replaceAll("\"file\".+\\R\\s*", ""));
}

@Test
Expand All @@ -45,8 +45,8 @@ public void testRuleGroupFolder() throws Exception{
final String expected = loadFile(new File("src/test/resources/com/cflint/integration/output.rulegroup.expected.json"));
final String actual = loadFile(new File("src/test/resources/com/cflint/integration/output.rulegroup.json"));
assertEquals(
expected.replaceAll("\\\\","/").replaceAll("/+","/").replaceAll("\r\n", "\n").replaceAll("\\s\"file\".+\n", ""),
actual.replaceAll("\\\\","/").replaceAll("/+","/").replaceAll("\r\n", "\n").replaceAll("\\s\"file\".+\n", ""));
expected.replaceAll("\\\\","/").replaceAll("/+","/").replaceAll("\\R", "\n").replaceAll("\"file\".+\\R\\s*", ""),
actual.replaceAll("\\\\","/").replaceAll("/+","/").replaceAll("\\R", "\n").replaceAll("\"file\".+\\R\\s*", ""));
}


Expand All @@ -68,8 +68,8 @@ public void test_194() throws Exception{
final String actual = loadFile(tempFile);
tempFile.delete();
assertEquals(
expected.replaceAll("\\\\","/").replaceAll("/+","/").replaceAll("\r\n", "\n").replaceAll("\\s\"file\".+\n", ""),
actual.replaceAll("\\\\","/").replaceAll("/+","/").replaceAll("\r\n", "\n").replaceAll("\\s\"file\".+\n", ""));
expected.replaceAll("\\\\","/").replaceAll("/+","/").replaceAll("\\R", "\n").replaceAll("\"file\".+\\R\\s*", ""),
actual.replaceAll("\\\\","/").replaceAll("/+","/").replaceAll("\\R", "\n").replaceAll("\"file\".+\\R\\s*", ""));
}
public static String loadFile(File file) throws IOException {
InputStream is = new FileInputStream(file);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"category" : "CFLINT",
"abbrev" : "CI",
"locations" : [ {
"fileName" : "test.cfc",
"fileName" : "test.cfc",
"function" : "",
"column" : 0,
"line" : 1,
Expand All @@ -21,7 +21,7 @@
"category" : "CFLINT",
"abbrev" : "FH",
"locations" : [ {
"fileName" : "test.cfc",
"fileName" : "test.cfc",
"function" : "getStringFromStruct",
"column" : 16,
"line" : 2,
Expand All @@ -36,7 +36,7 @@
"category" : "CFLINT",
"abbrev" : "FH",
"locations" : [ {
"fileName" : "test.cfc",
"fileName" : "test.cfc",
"function" : "getStringFromStruct",
"column" : 16,
"line" : 2,
Expand All @@ -51,7 +51,7 @@
"category" : "CFLINT",
"abbrev" : "FH",
"locations" : [ {
"fileName" : "test.cfc",
"fileName" : "test.cfc",
"function" : "getStringFromStruct",
"column" : 16,
"line" : 2,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"category" : "CFLINT",
"abbrev" : "CI",
"locations" : [ {
"fileName" : "test.cfc",
"fileName" : "test.cfc",
"function" : "",
"column" : 0,
"line" : 1,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"category" : "CFLINT",
"abbrev" : "CI",
"locations" : [ {
"fileName" : "test.cfc",
"fileName" : "test.cfc",
"function" : "",
"column" : 0,
"line" : 1,
Expand Down

0 comments on commit 9fd1344

Please sign in to comment.