Skip to content

Commit f30edc1

Browse files
committed
mycology test leak less data
system env counts as kinda private, so we don't log everything, only BAD
1 parent b91e2b3 commit f30edc1

File tree

1 file changed

+9
-1
lines changed

1 file changed

+9
-1
lines changed

src/test/java/com/falsepattern/jfunge/storage/TestMycology.java

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,15 @@ public void testMycology() {
2626
}
2727
});
2828
val returnCode = Assertions.assertDoesNotThrow(() -> Interpreter.executeProgram(false, new String[]{"mycology.b98"}, program.toByteArray(), 100000, input, output));
29-
Assertions.assertTrue(Arrays.stream(output.toString().split("\n")).noneMatch((line) -> line.startsWith("BAD")));
29+
val txt = output.toString();
30+
Assertions.assertTrue(Arrays.stream(txt.split("\n")).noneMatch((line) -> {
31+
if (line.startsWith("BAD")) {
32+
System.out.println(line);
33+
return true;
34+
} else {
35+
return false;
36+
}
37+
}));
3038
Assertions.assertEquals(15, returnCode);
3139
}
3240
}

0 commit comments

Comments
 (0)