Skip to content

Commit d0ca313

Browse files
authored
Full header (#8)
* added FAT sector list to header
1 parent 019ea1a commit d0ca313

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

tests/test_vbaProjectCompiler.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ def test_header():
1717
project = VbaProject('.')
1818
result = project.header()
1919
expected = b'\xD0\xCF\x11\xE0\xA1\xB1\x1A\xE1\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x3E\x00\x03\x00\xFE\xFF\x09\x00\x06\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x00\x01\x00\x00\x00\x01\x00\x00\x00\x00\x00\x00\x00\x00\x10\x00\x00\x02\x00\x00\x00\x01\x00\x00\x00\xFE\xFF\xFF\xFF\x00\x00\x00\x00'
20+
empty = b'\xff\xff\xff\xff'
21+
emptyLine = empty * 4
22+
padding = emptyLine * 27
23+
expected += b'\x00\x00\x00\x00' + padding
2024
assert result == expected
2125

2226
def test_streamSectors():

vbaProjectCompiler/main.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,8 @@ def header(self):
102102
csectDif = LONG_ZERO
103103
header += csectDif
104104

105-
#sectFat = writeFatSectorList()
106-
#header += sectFat
105+
sectFat = self.writeFatSectorList()
106+
header += sectFat
107107
return header
108108

109109
def addStreamSectorList(self, list):

0 commit comments

Comments
 (0)