Changeset View
Changeset View
Standalone View
Standalone View
source/lib/file/archive/tests/test_archive_zip.h
/* Copyright (C) 2021 Wildfire Games. | /* Copyright (C) 2021 Wildfire Games. | ||||
Lint: Inaccurate Copyright Year: Inaccurate Copyright Year | |||||
* | * | ||||
* Permission is hereby granted, free of charge, to any person obtaining | * Permission is hereby granted, free of charge, to any person obtaining | ||||
* a copy of this software and associated documentation files (the | * a copy of this software and associated documentation files (the | ||||
* "Software"), to deal in the Software without restriction, including | * "Software"), to deal in the Software without restriction, including | ||||
* without limitation the rights to use, copy, modify, merge, publish, | * without limitation the rights to use, copy, modify, merge, publish, | ||||
* distribute, sublicense, and/or sell copies of the Software, and to | * distribute, sublicense, and/or sell copies of the Software, and to | ||||
* permit persons to whom the Software is furnished to do so, subject to | * permit persons to whom the Software is furnished to do so, subject to | ||||
* the following conditions: | * the following conditions: | ||||
▲ Show 20 Lines • Show All 89 Lines • ▼ Show 20 Lines | void test_scan_suspiciousZipFile() | ||||
g_ResultBuffer = ""; | g_ResultBuffer = ""; | ||||
TS_ASSERT_EQUALS(INFO::OK, testee->ReadEntries(TestArchiveZip::ArchiveEntryCallback, 0)); | TS_ASSERT_EQUALS(INFO::OK, testee->ReadEntries(TestArchiveZip::ArchiveEntryCallback, 0)); | ||||
TS_ASSERT_EQUALS("buildzipwithcomment.sh", g_ResultBuffer); | TS_ASSERT_EQUALS("buildzipwithcomment.sh", g_ResultBuffer); | ||||
} | } | ||||
private: | private: | ||||
static void ArchiveEntryCallback( | static Status ArchiveEntryCallback( | ||||
const VfsPath& path, | const VfsPath& path, | ||||
const CFileInfo& UNUSED(fileInfo), | const CFileInfo& UNUSED(fileInfo), | ||||
PIArchiveFile UNUSED(archiveFile), | PIArchiveFile UNUSED(archiveFile), | ||||
uintptr_t UNUSED(cbData)) | uintptr_t UNUSED(cbData)) | ||||
{ | { | ||||
g_ResultBuffer = path.string8(); | g_ResultBuffer = path.string8(); | ||||
return INFO::OK; | |||||
} | } | ||||
}; | }; |
Wildfire Games · Phabricator
Inaccurate Copyright Year