GeezerVison is showing github.com — Changing new line delimiters to \\R · biojava/biojava@126f4ec
File treeExpand file treeCollapse file tree Open diff view settings biojava-core/src/test/java/org/biojava/nbio/core biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test/align
Expand file treeCollapse file tree Open diff view settings Collapse file Copy file name to clipboardExpand all lines: biojava-core/src/test/java/org/biojava/nbio/core/alignment/matrices/SubstitutionMatrixTest.java +4-4Lines changed: 4 additions & 4 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -54,8 +54,8 @@ void getMatrixReturnsCopy(){ | 54 | 54 | void matrixToString(){ | 55 | 55 | String asString = sm.toString(); | 56 | 56 | // description + 5*2 for ATCGNatcgn + 1 header + 1 for '-' | 57 | | - assertEquals(13, asString.split("\n").length); | 58 | | - String header = asString.split("\r?\n")[1]; | | 57 | + assertEquals(13, asString.split("\\n").length); | | 58 | + String header = asString.split("\\R")[1]; | 59 | 59 | assertTrue(header.replaceAll(" ","").matches("[ATCGatcgNn-]+")); | 60 | 60 | } | 61 | 61 |
| @@ -64,8 +64,8 @@ void matrixAsString(){ | 64 | 64 | String asString = sm.getMatrixAsString(); | 65 | 65 |
| 66 | 66 | // 5*2 for ATCGNatcgn + 1 header + 1 for '-' | 67 | | - assertEquals(12, asString.split("\n").length); | 68 | | - String header = asString.split("\r?\n")[0]; | | 67 | + assertEquals(12, asString.split("\\n").length); | | 68 | + String header = asString.split("\\R")[0]; | 69 | 69 | assertTrue(header.replaceAll(" ","").matches("[ATCGatcgNn-]+")); | 70 | 70 | } | 71 | 71 | } |
Collapse file Copy file name to clipboardExpand all lines: biojava-core/src/test/java/org/biojava/nbio/core/sequence/io/FastaGeneWriterTest.java +1-1Lines changed: 1 addition & 1 deletion | Original file line number | Diff line number | Diff line change |
|---|
@@ -58,7 +58,7 @@ void basicGeneWriterTest() throws Exception { | 58 | 58 | fastaWriter.process(); | 59 | 59 |
| 60 | 60 | String output = new String(os.toByteArray(), "UTF-8"); | 61 | | - String [] lines = output.split("\r?\n"); | | 61 | + String [] lines = output.split("\\R"); | 62 | 62 | assertEquals(4,lines.length); | 63 | 63 | assertEquals(">gene1", lines[0]); | 64 | 64 | assertEquals("ATATATATATaTATAtatat", lines[1]); | |
Collapse file Copy file name to clipboardExpand all lines: biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test/align/FlipAFPChainTest.java +2-3Lines changed: 2 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -185,10 +185,9 @@ public static void rotateAtoms2(AFPChain afpChain,Atom[] ca2){ | 185 | 185 | } | 186 | 186 |
| 187 | 187 |
| 188 | | - private static final String newline = System.getProperty("line.separator"); | 189 | 188 | private void printFirstMismatch(String s1, String s2){ | 190 | | - String[] spl1 = s1.split(newline); | 191 | | - String[] spl2 = s2.split(newline); | | 189 | + String[] spl1 = s1.split("\\R"); | | 190 | + String[] spl2 = s2.split("\\R"); | 192 | 191 |
| 193 | 192 | for (int i = 0 ; i < spl1.length ; i++){ | 194 | 193 |
| |
Collapse file Copy file name to clipboardExpand all lines: biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test/align/fatcat/FlipAFPChainTest.java +2-3Lines changed: 2 additions & 3 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -204,10 +204,9 @@ public static void rotateAtoms2(AFPChain afpChain,Atom[] ca2){ | 204 | 204 | } | 205 | 205 |
| 206 | 206 |
| 207 | | - static final String newline = System.getProperty("line.separator"); | 208 | 207 | public void printFirstMismatch(String s1, String s2){ | 209 | | - String[] spl1 = s1.split(newline); | 210 | | - String[] spl2 = s2.split(newline); | | 208 | + String[] spl1 = s1.split("\\R"); | | 209 | + String[] spl2 = s2.split("\\R"); | 211 | 210 |
| 212 | 211 | for (int i = 0 ; i < spl1.length ; i++){ | 213 | 212 |
| |
Collapse file Copy file name to clipboardExpand all lines: biojava-integrationtest/src/test/java/org/biojava/nbio/structure/test/align/fatcat/TestOutputStrings.java +2-2Lines changed: 2 additions & 2 deletions | Original file line number | Diff line number | Diff line change |
|---|
@@ -28,8 +28,8 @@ public class TestOutputStrings { | 28 | 28 | private static final String newline = System.getProperty("line.separator"); | 29 | 29 |
| 30 | 30 | public void printFirstMismatch(String s1, String s2){ | 31 | | - String[] spl1 = s1.split(newline); | 32 | | - String[] spl2 = s2.split(newline); | | 31 | + String[] spl1 = s1.split("\\R"); | | 32 | + String[] spl2 = s2.split("\\R"); | 33 | 33 |
| 34 | 34 | for (int i = 0 ; i < spl1.length ; i++){ | 35 | 35 |
| |
|