} catch (IOException e) {
throw new IOException(e.getMessage() + "; expected "
+ new String(expected) + " but got "
- + resultStream.toString(), e);
+ + resultStream.toString());
}
if (!Arrays.equals(expected, resultStream.toByteArray())) {
throw new Exception("Mismatch: expected " + new String(expected)
checkBoundaryDetection("xyz123aa", "aa", "xyz123");
}
+ public void testRepeatingNewlineBoundary() throws Exception {
+ checkBoundaryDetection("1234567890\n\n1234567890", "\n\n", "");
+ }
+
public void testRepeatingStringBoundary() throws Exception {
checkBoundaryDetection("ababxyz123", "abab", "");
checkBoundaryDetection("abaxyzabab123", "abab", "abaxyz");