More NPOIFS write testing, and fix a problem with writing xbat details out

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1589806 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Nick Burch 2014-04-24 17:44:10 +00:00
parent 166b8f6f8a
commit a94f150450
2 changed files with 5 additions and 3 deletions

View File

@ -729,6 +729,11 @@ public class NPOIFSFileSystem extends BlockStore
ByteBuffer block = getBlockAt(bat.getOurBlockIndex());
BlockAllocationTableWriter.writeBlock(bat, block);
}
// XBats
for(BATBlock bat : _xbat_blocks) {
ByteBuffer block = getBlockAt(bat.getOurBlockIndex());
BlockAllocationTableWriter.writeBlock(bat, block);
}
// SBATs
_mini_store.syncWithDataSource();

View File

@ -512,13 +512,10 @@ public final class TestNPOIFSFileSystem {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
fs.writeFilesystem(baos);
// TODO Correct this to work
if(1==2) {
// Check that it is seen correctly
fs = new NPOIFSFileSystem(new ByteArrayInputStream(baos.toByteArray()));
assertBATCount(fs, 237, 2);
// TODO Do some more checks
}
// All done
fs.close();