erdtree
erdtree copied to clipboard
Tests failing on Windows for Version 3
Tests are failing on Windows. The OS: Windows 11 files changed after V3 release: 0 The command I've used:
cargo +nightly nextest run
Even when using the standard “test” from cargo, some tests are still failing.
This only appears to be an issue in Windows, though. I've tried it on WSL (Ubuntu) and everything worked perfectly fine.
Hmmm strange.. looking at the screenshot you posted it seems as though the while apparent logical size is computed on Linux is differing from how Windows computes. Here's how I'm computing logical size:
src/disk_usage/file_size/byte.rs
pub fn init_logical(
metadata: &Metadata,
prefix_kind: PrefixKind,
human_readable: bool,
) -> Self {
let value = metadata.len();
let kind = MetricKind::Logical;
Self {
value,
human_readable,
kind,
prefix_kind,
cached_display: RefCell::default(),
}
}
It's a simple call to Metadata::len which probably behaves differently for windows. Not sure what the solution to this is given that we'd probably need a windows variant for each test and I'm not a fan of that personally. Open to ideas though.