diff options
Diffstat (limited to 'test/StormTest.cpp')
-rwxr-xr-x | test/StormTest.cpp | 22 |
1 files changed, 20 insertions, 2 deletions
diff --git a/test/StormTest.cpp b/test/StormTest.cpp index 048f715..3276c59 100755 --- a/test/StormTest.cpp +++ b/test/StormTest.cpp @@ -1651,7 +1651,9 @@ static DWORD SearchArchive( // Construct the full name of the listfile
CreateFullPathName(szListFile, _countof(szListFile), szListFileDir, _T("ListFile_Blizzard.txt"));
- // fp = fopen("E:\\mpq-listing.txt", "wt");
+
+ // Create the log file with file sizes and CRCs
+ //fp = fopen("C:\\mpq-listing.txt", "wt");
// Prepare hashing
md5_init(&md5state);
@@ -1694,9 +1696,23 @@ static DWORD SearchArchive( if(fp != NULL)
{
pFileData->dwCrc32 = crc32(0, pFileData->FileData, pFileData->dwFileSize);
- fprintf(fp, "%08x: %s \n", pFileData->dwCrc32, sf.cFileName);
+ fprintf(fp, "%08x:%08x: %s \n", pFileData->dwFileSize, pFileData->dwCrc32, sf.cFileName);
}
+ // Also write the content of the file to the test directory
+ //if(fp != NULL)
+ //{
+ // FILE * fp2;
+ // char szFullPath[MAX_PATH] = "C:\\test\\";
+
+ // strcat(szFullPath, sf.cFileName);
+ // if((fp2 = fopen(szFullPath, "wb")) != NULL)
+ // {
+ // fwrite(pFileData->FileData, 1, pFileData->dwFileSize, fp2);
+ // fclose(fp2);
+ // }
+ //}
+
// Free the loaded file data
STORM_FREE(pFileData);
}
@@ -4046,6 +4062,7 @@ static const TEST_INFO1 Test_OpenMpqs[] = {_T("MPQ_2022_v1_Sniper.scx"), NULL, "2e955271b70b79344ad85b698f6ce9d8", 64}, // Multiple items in hash table for staredit\scenario.chk (locale=0, platform=0)
{_T("MPQ_2022_v1_OcOc_Bound_2.scx"), NULL, "25cad16a2fb4e883767a1f512fc1dce7", 16},
{_T("MPQ_2023_v1_Lusin2Rpg1.28.w3x"), NULL, "9c21352f06cf763fcf05e8a2691e6194", 10305, &HashVals},
+ {_T("MPQ_2024_v1_300TK2.09p.w3x"), NULL, "e442e3d2e7d457b9ba544544013b791f", 32588}, // Fake MPQ User data, fake MPQ header at offset 0x200
// ASI plugins
{_T("MPQ_2020_v1_HS0.1.asi"), NULL, "50cba7460a6e6d270804fb9776a7ec4f", 6022},
@@ -4093,6 +4110,7 @@ static const TEST_INFO1 Test_OpenMpqs[] = // Check the GetFileInfo operations
{_T("MPQ_2002_v1_StrongSignature.w3m"), NULL, "7b725d87e07a2173c42fe2314b95fa6c", 17 | TFLG_GET_FILE_INFO},
{_T("MPQ_2013_v4_SC2_EmptyMap.SC2Map"), NULL, "88e1b9a88d56688c9c24037782b7bb68", 33 | TFLG_GET_FILE_INFO},
+
};
static const TEST_INFO1 Test_ReopenMpqs[] =
|