Lua автотест для проверки работы с ZIP-архивами (Issue #544)#715
Open
ShiftyX1 wants to merge 1 commit into
Open
Lua автотест для проверки работы с ZIP-архивами (Issue #544)#715ShiftyX1 wants to merge 1 commit into
ShiftyX1 wants to merge 1 commit into
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Описание
Добавлен автотест zip_filesystem.lua для проверки функций file.mount, file.unmount и file.create_zip
Тест создает директорию с файлами разных типов (текстовые бинарные unicode вложенные) архивирует ее через file.create_zip, монтирует архив и проверяет корректность выполнения операций чтения. (#544 соответствующий TODO Issue)
Обнаруженные баги
в логи добавил понятные сообщения об ошибках но на всякий случай укажу тут
1. ROOT_EXISTS_INCONSISTENCY
file.exists() возвращает false для корня zip архива
file.isdir() возвращает true для того же пути
ZipFileDevise::isdir() обрабатывает пустой путь, в отличие от ZipFileDevice::exists()
2. LEADING_SLASH_IN_ZIP_PATHS
file.create_zip генерирует пути с ведущим слэшем , что в свою очередь ломает file.list() для корневой директории (возвращает по итогу 0 элементов)