Skip to content

Commit 569a45d

Browse files
committed
Add line separator fixtures
+ Add .gitattributes for fixtures with a specific eol.
1 parent 48a590e commit 569a45d

File tree

7 files changed

+42
-0
lines changed

7 files changed

+42
-0
lines changed
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# Test resources that need specific eol
2+
**/correct-crlf.txt eol=crlf
3+
**/correct-cr.txt eol=cr
4+
**/correct-lf.txt eol=lf

spring-javaformat/spring-javaformat-formatter-tests/src/test/resources/expected/correct-cr.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package correct;public class CorrectCr { public static void main(String[] args) throws Exception { // FIXME }}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package correct;
2+
3+
public class CorrectCrlf {
4+
5+
public static void main(String[] args) throws Exception {
6+
// FIXME
7+
}
8+
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package correct;
2+
3+
public class CorrectLf {
4+
5+
public static void main(String[] args) throws Exception {
6+
// FIXME
7+
}
8+
9+
}

spring-javaformat/spring-javaformat-formatter-tests/src/test/resources/source/correct-cr.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
package correct;public class CorrectCr { public static void main(String[] args) throws Exception { // FIXME }}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package correct;
2+
3+
public class CorrectCrlf {
4+
5+
public static void main(String[] args) throws Exception {
6+
// FIXME
7+
}
8+
9+
}
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
package correct;
2+
3+
public class CorrectLf {
4+
5+
public static void main(String[] args) throws Exception {
6+
// FIXME
7+
}
8+
9+
}

0 commit comments

Comments
 (0)