From 3424ac8ba449b6036d49fd28725f6a2d7c4548e9 Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Fri, 17 Dec 2021 23:42:52 +0100 Subject: Finalizing --- test/StormTest.cpp | 55 +++++++++++++++++++++++------------------------------ test/TLogHelper.cpp | 2 +- 2 files changed, 25 insertions(+), 32 deletions(-) (limited to 'test') diff --git a/test/StormTest.cpp b/test/StormTest.cpp index 3d783aa..13b0ace 100644 --- a/test/StormTest.cpp +++ b/test/StormTest.cpp @@ -4327,56 +4327,49 @@ int _tmain(int argc, TCHAR * argv[]) // Open all files from the command line // -<<<<<<< HEAD for(int i = 1; i < argc; i++) { TestArchive(_T("MPQ_2021_v1_CantExtractCHK.scx"), _T("Listfile_Blizzard.txt"), 0, NULL, NULL); } -======= - //for(int i = 1; i < argc; i++) - //{ - // TestArchive(_T("MPQ_2021_v1_CantExtractCHK.scx"), _T("Listfile_Blizzard.txt"), TEST_FLAG_FILE_COUNT, NULL, NULL); - //} ->>>>>>> 1a94f94 (Support for protected SCX files) // // Search all testing archives and verify their SHA1 hash // - //if(dwErrCode == ERROR_SUCCESS) - //{ - // dwErrCode = FindFiles(ForEachFile_VerifyFileChecksum, szMpqSubDir); - //} + if(dwErrCode == ERROR_SUCCESS) + { + dwErrCode = FindFiles(ForEachFile_VerifyFileChecksum, szMpqSubDir); + } // // Test file stream operations // - //if(dwErrCode == ERROR_SUCCESS) - //{ - // for(size_t i = 0; i < _countof(TestList_StreamOps); i++) - // { - // dwErrCode = TestFileStreamOperations(TestList_StreamOps[i].szMpqName1, TestList_StreamOps[i].dwFlags); - // if(dwErrCode != ERROR_SUCCESS) - // break; - // } - //} + if(dwErrCode == ERROR_SUCCESS) + { + for(size_t i = 0; i < _countof(TestList_StreamOps); i++) + { + dwErrCode = TestFileStreamOperations(TestList_StreamOps[i].szMpqName1, TestList_StreamOps[i].dwFlags); + if(dwErrCode != ERROR_SUCCESS) + break; + } + } // // Test master-mirror reading operations // - //if(dwErrCode == ERROR_SUCCESS) - //{ - // for(size_t i = 0; i < _countof(TestList_MasterMirror); i++) - // { - // dwErrCode = TestReadFile_MasterMirror(TestList_MasterMirror[i].szMpqName1, - // TestList_MasterMirror[i].szMpqName2, - // TestList_MasterMirror[i].dwFlags != 0); - // if(dwErrCode != ERROR_SUCCESS) - // break; - // } - //} + if(dwErrCode == ERROR_SUCCESS) + { + for(size_t i = 0; i < _countof(TestList_MasterMirror); i++) + { + dwErrCode = TestReadFile_MasterMirror(TestList_MasterMirror[i].szMpqName1, + TestList_MasterMirror[i].szMpqName2, + TestList_MasterMirror[i].dwFlags != 0); + if(dwErrCode != ERROR_SUCCESS) + break; + } + } // // Test opening various archives - correct, damaged, protected diff --git a/test/TLogHelper.cpp b/test/TLogHelper.cpp index f277e64..3d09823 100644 --- a/test/TLogHelper.cpp +++ b/test/TLogHelper.cpp @@ -423,7 +423,7 @@ char * TLogHelper::CopyFormatCharacter(char * szBuffer, const char *& szFormat) // String format if(szFormat[0] == '%') { - if(szFormat[1] == 's') + if(szFormat[1] == 's' && szFormat[2] != ')') { strcpy(szBuffer, szStringFormat); szFormat += 2; -- cgit v1.2.3