#[cfg(unix)]
mod unix;
#[cfg(target_os = "linux")]
mod linux;
#[cfg(target_os = "linux")]
pub use linux::*;
#[cfg(target_os = "macos")]
mod macos;
#[cfg(target_os = "macos")]
pub use macos::*;
#[cfg(windows)]
mod windows;
#[cfg(windows)]
pub use windows::*;
#[cfg(not(any(target_os = "linux", target_os = "macos", windows)))]
compile_error!("HatchZip has no platform module for this system yet; add one in src/platform/");
#[cfg(test)]
mod punch_tests {
#[test]
fn the_overlap_fits_inside_the_margin() {
let dir = std::env::temp_dir();
let margin = super::punch_margin(&dir);
let overlap = super::punch_overlap(&dir);
assert!(overlap > 0, "the overlap is {overlap}");
assert!(overlap <= margin, "overlap {overlap} > margin {margin}");
}
}
#[cfg(all(test, target_os = "linux"))]
mod tests {
#[test]
fn linux_temp_dirs_can_punch() {
assert!(crate::fsutil::can_punch(&std::env::temp_dir()));
}
#[test]
fn ci_temp_dirs_keep_case_apart() {
if std::env::var_os("HATCHZIP_EXPECT_PUNCH").is_some() {
assert!(super::case_sensitive(&std::env::temp_dir()));
}
}
}