Skip to content

Commit 63db0e0

Browse files
committed
Add test case with windows linebreaks
1 parent 4f92b78 commit 63db0e0

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

tests/com.eclipsesource.jshint.test/src/com/eclipsesource/jshint/JSHint_Compatibility_Test.java

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -196,6 +196,14 @@ public void positionIsCorrectWithMultipleTabs() {
196196
assertEquals( "1.12", getPositionFromProblem( 0 ) );
197197
}
198198

199+
@Test
200+
public void toleratesWindowsLineBreaks() {
201+
jsHint.configure( new Configuration().addOption( "white", false ) );
202+
jsHint.check( "var x = 1;\r\nvar y = 2;\r\nvar z = 23 == null;", handler );
203+
204+
assertEquals( "3.11", getPositionFromProblem( 0 ) );
205+
}
206+
199207
private void loadJsHint() throws IOException {
200208
ClassLoader classLoader = getClass().getClassLoader();
201209
InputStream stream = classLoader.getResourceAsStream( jsHintResource );

0 commit comments

Comments
 (0)