aboutsummaryrefslogtreecommitdiff
path: root/src/test/java
diff options
context:
space:
mode:
authorMichal Kordas <kordas.michal@gmail.com>2015-10-24 23:28:58 +0200
committerRoman Ivanov <ivanov-jr@mail.ru>2015-10-24 16:02:00 -0700
commitff4536885663fc66e9cea73b76fa30e36b5d92d7 (patch)
treeb6273974007ca531101c365f767a964343b6e7f1 /src/test/java
parent617178cb1f9cbb2535862b6e1d6c351f5635d242 (diff)
downloadcheckstyle-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.java11
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);
+ }
}