From eb372d3e0cf2bb874402bc4ddcca2bae79696249 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sun, 28 Jun 2026 15:15:37 +0900 Subject: test(downloader): cfg-gate XzDownloaderTest skip on Windows/32bit Replace the todo!() markTestSkipped placeholders in set_up with a compile-time cfg gate on the test function, mirroring PHP's setUp skips on Windows and 32bit. Co-Authored-By: Claude Opus 4.8 (1M context) --- crates/shirabe/tests/downloader/xz_downloader_test.rs | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/crates/shirabe/tests/downloader/xz_downloader_test.rs b/crates/shirabe/tests/downloader/xz_downloader_test.rs index 71f3960..d69e7cc 100644 --- a/crates/shirabe/tests/downloader/xz_downloader_test.rs +++ b/crates/shirabe/tests/downloader/xz_downloader_test.rs @@ -32,15 +32,9 @@ fn run(future: F) -> F::Output { .block_on(future) } +/// ref: setUp markTestSkipped on Windows / 32bit, expressed as a compile-time +/// cfg gate on the test function below. fn set_up() -> TempDir { - if Platform::is_windows() { - // markTestSkipped('Skip test on Windows') - todo!() - } - if std::mem::size_of::() == 4 { - // markTestSkipped('Skip test on 32bit') - todo!() - } TempDir::new().unwrap() } @@ -77,6 +71,7 @@ fn get_config(config_options: IndexMap, use_environment: bool) config } +#[cfg(all(not(windows), target_pointer_width = "64"))] #[ignore] #[test] fn test_error_messages() { -- cgit v1.3.1