summaryrefslogtreecommitdiff
path: root/test/storage/directory_reading.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'test/storage/directory_reading.cpp')
-rw-r--r--test/storage/directory_reading.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/test/storage/directory_reading.cpp b/test/storage/directory_reading.cpp
index bf472b5c79..3ee4dd1721 100644
--- a/test/storage/directory_reading.cpp
+++ b/test/storage/directory_reading.cpp
@@ -4,12 +4,16 @@
#include <mbgl/storage/default_file_source.hpp>
-TEST_F(Storage, ReadDirectory) {
+TEST_F(Storage, AssetReadDirectory) {
SCOPED_TEST(ReadDirectory)
using namespace mbgl;
+#ifdef MBGL_ASSET_ZIP
+ DefaultFileSource fs(nullptr, uv_default_loop(), "test/fixtures/storage/assets.zip");
+#else
DefaultFileSource fs(nullptr, uv_default_loop());
+#endif
fs.request({ Resource::Unknown, "asset://TEST_DATA/fixtures/storage" }, uv_default_loop(), [&](const Response &res) {
EXPECT_EQ(Response::Error, res.status);
@@ -17,7 +21,11 @@ TEST_F(Storage, ReadDirectory) {
EXPECT_EQ(0, res.expires);
EXPECT_EQ(0, res.modified);
EXPECT_EQ("", res.etag);
+#ifdef MBGL_ASSET_ZIP
+ EXPECT_EQ("No such file", res.message);
+#elif MBGL_ASSET_FS
EXPECT_EQ("illegal operation on a directory", res.message);
+#endif
ReadDirectory.finish();
});