Skip to content

Commit 077bfc7

Browse files
author
jantje
committed
#1371 do more cleanup before comparing when testing
1 parent 08659e9 commit 077bfc7

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

io.sloeber.tests/src/io/sloeber/junit/TxtWorkAroundRegression.java

+4-2
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,10 @@ public static Collection examples() {
3838
if (fullList) {
3939
searchFolders(new File(ROOTFOLDER), folders, 10);
4040
} else {
41+
folders.add(new Object[] { "E:\\arduinoTxt-Backup-2021-08-19\\STM32\\hardware\\stm32\\1.9.0" });
4142
folders.add(new Object[] { "E:\\arduinoTxt-Backup-2021-08-19\\digistump\\hardware\\sam\\1.6.7" });
4243
folders.add(new Object[] { "E:\\arduinoTxt-Backup-2021-08-19\\nucDuino\\hardware\\nucDuino\\1.0.3" });
43-
folders.add(new Object[] { "E:\\arduinoTxt-Backup-2021-08-19\\STM32\\hardware\\stm32\\1.9.0" });
44+
4445
folders.add(new Object[] { "E:\\arduinoTxt-Backup-2021-08-19\\TL7788\\hardware\\arm\\1.0.3" });
4546
}
4647
return folders;
@@ -152,7 +153,8 @@ public void programmerTxt() throws Exception {
152153
}
153154

154155
private String clean(String expected) {
155-
return expected.replaceAll("(?m)^#.*", "").replaceAll("(?m)^\\s*", "").replaceAll("(?m)\\s*$", "")
156+
return expected.replace("\r\n", "\n").replaceAll("(?m)^#.*", "").replaceAll("(?m)^\\s*", "")
157+
.replaceAll("(?m)\\s*$", "").replaceAll("(?m)^(\\S*)\\s*=", "$1=")
156158
.replace("\n\n", "\n").replace("\n\n", "\n");
157159
}
158160

0 commit comments

Comments
 (0)