aboutsummaryrefslogtreecommitdiffhomepage
path: root/crates/shirabe/tests/downloader/zip_downloader_test.rs
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2026-06-21 13:11:49 +0900
committernsfisis <nsfisis@gmail.com>2026-06-21 13:11:49 +0900
commitf0f5f084c883dc4f5b6e61603e82cd1c2092fd9d (patch)
treea8b91efea7f17e61a8d0d9a82604d3ed964010a7 /crates/shirabe/tests/downloader/zip_downloader_test.rs
parentb1571202200e4dc630202928f5ff78959273c7ec (diff)
downloadphp-shirabe-f0f5f084c883dc4f5b6e61603e82cd1c2092fd9d.tar.gz
php-shirabe-f0f5f084c883dc4f5b6e61603e82cd1c2092fd9d.tar.zst
php-shirabe-f0f5f084c883dc4f5b6e61603e82cd1c2092fd9d.zip
test(tests): expand stub macros into plain test functions
The per-file stub!/encode_stub!/etc. macros generated #[ignore]d test functions but obscured the individual test bodies. Expanding them inline removes the macro indirection so future ports can fill in each function directly. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Diffstat (limited to 'crates/shirabe/tests/downloader/zip_downloader_test.rs')
-rw-r--r--crates/shirabe/tests/downloader/zip_downloader_test.rs88
1 files changed, 69 insertions, 19 deletions
diff --git a/crates/shirabe/tests/downloader/zip_downloader_test.rs b/crates/shirabe/tests/downloader/zip_downloader_test.rs
index aa4646c..c22afa1 100644
--- a/crates/shirabe/tests/downloader/zip_downloader_test.rs
+++ b/crates/shirabe/tests/downloader/zip_downloader_test.rs
@@ -47,24 +47,74 @@ impl Drop for TearDown {
// These construct a ZipDownloader with a mocked IO/HttpDownloader/ProcessExecutor and rely
// on ZipArchive extraction (todo!() in the php-shim) plus mocked unzip behaviour.
-macro_rules! stub {
- ($name:ident) => {
- #[test]
- #[ignore = "mocks IO/HttpDownloader/ProcessExecutor and uses ZipArchive (todo!())"]
- fn $name() {
- let set_up = set_up();
- let _tear_down = TearDown::new(set_up.test_dir.path().to_path_buf());
- let _ = (&set_up.test_dir, &set_up.filename);
- todo!()
- }
- };
+#[test]
+#[ignore = "mocks IO/HttpDownloader/ProcessExecutor and uses ZipArchive (todo!())"]
+fn test_error_messages() {
+ let set_up = set_up();
+ let _tear_down = TearDown::new(set_up.test_dir.path().to_path_buf());
+ let _ = (&set_up.test_dir, &set_up.filename);
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO/HttpDownloader/ProcessExecutor and uses ZipArchive (todo!())"]
+fn test_zip_archive_only_failed() {
+ let set_up = set_up();
+ let _tear_down = TearDown::new(set_up.test_dir.path().to_path_buf());
+ let _ = (&set_up.test_dir, &set_up.filename);
+ todo!()
}
-stub!(test_error_messages);
-stub!(test_zip_archive_only_failed);
-stub!(test_zip_archive_extract_only_failed);
-stub!(test_zip_archive_only_good);
-stub!(test_system_unzip_only_failed);
-stub!(test_system_unzip_only_good);
-stub!(test_non_windows_fallback_good);
-stub!(test_non_windows_fallback_failed);
+#[test]
+#[ignore = "mocks IO/HttpDownloader/ProcessExecutor and uses ZipArchive (todo!())"]
+fn test_zip_archive_extract_only_failed() {
+ let set_up = set_up();
+ let _tear_down = TearDown::new(set_up.test_dir.path().to_path_buf());
+ let _ = (&set_up.test_dir, &set_up.filename);
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO/HttpDownloader/ProcessExecutor and uses ZipArchive (todo!())"]
+fn test_zip_archive_only_good() {
+ let set_up = set_up();
+ let _tear_down = TearDown::new(set_up.test_dir.path().to_path_buf());
+ let _ = (&set_up.test_dir, &set_up.filename);
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO/HttpDownloader/ProcessExecutor and uses ZipArchive (todo!())"]
+fn test_system_unzip_only_failed() {
+ let set_up = set_up();
+ let _tear_down = TearDown::new(set_up.test_dir.path().to_path_buf());
+ let _ = (&set_up.test_dir, &set_up.filename);
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO/HttpDownloader/ProcessExecutor and uses ZipArchive (todo!())"]
+fn test_system_unzip_only_good() {
+ let set_up = set_up();
+ let _tear_down = TearDown::new(set_up.test_dir.path().to_path_buf());
+ let _ = (&set_up.test_dir, &set_up.filename);
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO/HttpDownloader/ProcessExecutor and uses ZipArchive (todo!())"]
+fn test_non_windows_fallback_good() {
+ let set_up = set_up();
+ let _tear_down = TearDown::new(set_up.test_dir.path().to_path_buf());
+ let _ = (&set_up.test_dir, &set_up.filename);
+ todo!()
+}
+
+#[test]
+#[ignore = "mocks IO/HttpDownloader/ProcessExecutor and uses ZipArchive (todo!())"]
+fn test_non_windows_fallback_failed() {
+ let set_up = set_up();
+ let _tear_down = TearDown::new(set_up.test_dir.path().to_path_buf());
+ let _ = (&set_up.test_dir, &set_up.filename);
+ todo!()
+}