Permalink
Browse files

Issue #4587: Moved all necessary resource files for NewlineAtEndOfFil…

…CheckTest
  • Loading branch information...
Kietzmann authored and romani committed Jul 9, 2017
1 parent 6e67426 commit 812b3416dcda571de5e6f7abd9d4e4c68c4dcdcf
View
@@ -1,3 +1,4 @@
/src/test/resources/com/puppycrawl/tools/checkstyle/checks/InputNewlineLfAtEndOfFile.java eol=lf
/src/test/resources/com/puppycrawl/tools/checkstyle/checks/InputNewlineCrlfAtEndOfFile.java eol=crlf
/src/test/resources/com/puppycrawl/tools/checkstyle/checks/misc/newlineatendoffile/InputNewlineLfAtEndOfFile.java eol=lf
/src/test/resources/com/puppycrawl/tools/checkstyle/checks/misc/newlineatendoffile/InputNewlineCrlfAtEndOfFile.java eol=crlf
/src/test/resources/com/puppycrawl/tools/checkstyle/checks/InputNewlineCrAtEndOfFile.java -text
/src/test/resources/com/puppycrawl/tools/checkstyle/checks/misc/newlineatendoffile/InputNewlineCrAtEndOfFile.java -text
@@ -20,6 +20,6 @@
<suppress checks="NewlineAtEndOfFile" files="[\\/]test[\\/].*[\\/]astprinter[\\/].*\.javadoc"/>
<!--Empty file cannot have any new line at the end. -->
<suppress checks="NewlineAtEndOfFile" files="[\\/]test[\\/].*[\\/]checks[\\/]InputEmptyFile\.txt"/>
<suppress checks="NewlineAtEndOfFile" files="[\\/]test[\\/].*[\\/]checks[\\/]misc[\\/]newlineatendoffile[\\/]InputEmptyFile\.txt"/>
<suppress checks="NewlineAtEndOfFile" files="[\\/]test[\\/].*[\\/]grammars[\\/]InputRegressionEmptyAst\.txt"/>
</suppressions>
@@ -60,7 +60,10 @@ protected DefaultConfiguration createCheckerConfig(
@Override
protected String getPath(String filename) throws IOException {
return super.getPath("checks" + File.separator + filename);
return super.getPath("checks" + File.separator
+ "misc" + File.separator
+ "newlineatendoffile" + File.separator
+ filename);
}
@Test
@@ -152,7 +152,7 @@ public void testCustomAstTree() throws Exception {
@Test
public void testNewlineCr() throws Exception {
verifyAst(super.getPath("/checks/InputNewlineCrAtEndOfFileAst.txt"),
super.getPath("/checks/InputNewlineCrAtEndOfFile.java"), true);
super.getPath("/checks/InputAstRegressionNewlineCrAtEndOfFile.java"), true);
}
@Test
@@ -0,0 +1 @@
////////////////////////////////////////////////////////////////////////////////// Test case file for checkstyle.// Created: 2015////////////////////////////////////////////////////////////////////////////////package com.puppycrawl.tools.checkstyle.checks;/** * Test case for detection of an existing CR newline at EOF, using the * NewlineAtEndOfFileCheck. * @author Martin Steiger **/public interface InputAstRegressionNewlineCrAtEndOfFile{/** Test with ending with CR newline*/}
@@ -25,7 +25,7 @@ INTERFACE_DEF -> INTERFACE_DEF [12:0]
| | `--BLOCK_COMMENT_END -> */ [11:2]
| `--LITERAL_PUBLIC -> public [12:0]
|--LITERAL_INTERFACE -> interface [12:7]
|--IDENT -> InputNewlineCrAtEndOfFile [12:17]
|--IDENT -> InputAstRegressionNewlineCrAtEndOfFile [12:17]
`--OBJBLOCK -> OBJBLOCK [13:0]
|--LCURLY -> { [13:0]
|--BLOCK_COMMENT_BEGIN -> /* [14:0]
@@ -2,7 +2,7 @@
// Test case file for checkstyle.
// Created: 2015
////////////////////////////////////////////////////////////////////////////////
package com.puppycrawl.tools.checkstyle.checks;
package com.puppycrawl.tools.checkstyle.checks.misc.newlineatendoffile;
/**
* Test case for detection of an existing CRLF newline at EOF, using the
@@ -2,7 +2,7 @@
// Test case file for checkstyle.
// Created: 2015
////////////////////////////////////////////////////////////////////////////////
package com.puppycrawl.tools.checkstyle.checks;
package com.puppycrawl.tools.checkstyle.checks.misc.newlineatendoffile;
/**
* Test case for detection of an existing LF newline at EOF, using the
@@ -2,7 +2,7 @@
// Test case file for checkstyle.
// Created: 2003
////////////////////////////////////////////////////////////////////////////////
package com.puppycrawl.tools.checkstyle.checks;
package com.puppycrawl.tools.checkstyle.checks.misc.newlineatendoffile;
/**
* Test case for detection of missing newlines at EOF, using the

0 comments on commit 812b341

Please sign in to comment.