Index: src/test/org/apache/lucene/index/TestCompoundFile.java =================================================================== --- src/test/org/apache/lucene/index/TestCompoundFile.java (revision 382277) +++ src/test/org/apache/lucene/index/TestCompoundFile.java (working copy) @@ -622,4 +622,26 @@ is.close(); cr.close(); } + + /** This test that writes larger than the size of the buffer output + * will correctly increment the file pointer. + */ + public void testLargeWrites() throws IOException { + IndexOutput os = dir.createOutput("testBufferStart.txt"); + + byte[] largeBuf = new byte[2048]; + for (int i=0; i