diff options
author | Michal Kordas <kordas.michal@gmail.com> | 2015-10-24 23:28:58 +0200 |
---|---|---|
committer | Roman Ivanov <ivanov-jr@mail.ru> | 2015-10-24 16:02:00 -0700 |
commit | ff4536885663fc66e9cea73b76fa30e36b5d92d7 (patch) | |
tree | b6273974007ca531101c365f767a964343b6e7f1 /src/test/java | |
parent | 617178cb1f9cbb2535862b6e1d6c351f5635d242 (diff) | |
download | checkstyle-ff4536885663fc66e9cea73b76fa30e36b5d92d7.tar.gz |
Issue #2433: Exclude lines with imports in LineLength check
Diffstat (limited to 'src/test/java')
-rw-r--r-- | src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/LineLengthCheckTest.java | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/LineLengthCheckTest.java b/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/LineLengthCheckTest.java index e238856a7..2e0f2063f 100644 --- a/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/LineLengthCheckTest.java +++ b/src/test/java/com/puppycrawl/tools/checkstyle/checks/sizes/LineLengthCheckTest.java @@ -78,4 +78,15 @@ public class LineLengthCheckTest extends BaseCheckTestSupport { }; verify(checkConfig, getPath("InputSimple.java"), expected); } + + @Test + public void shouldNotLogLongImportStatements() throws Exception { + final DefaultConfiguration checkConfig = + createCheckConfig(LineLengthCheck.class); + checkConfig.addAttribute("max", "80"); + final String[] expected = { + "9: " + getCheckMessage(MSG_KEY, 80, 87), + }; + verify(checkConfig, getPath("InputLongImportStatements.java"), expected); + } } |