#1223·lsd

test_date_custom_format_supports_nanos_with_length fails on macOS (aarch64-darwin)

Author: secanaCreated Jul 1, 2026Updated Aug 6, 2026

Environment

  • lsd version: 1.2.0
  • OS: macOS (aarch64-darwin / Apple Silicon)

Description

The integration test test_date_custom_format_supports_nanos_with_length fails when building lsd on macOS. The test creates two files and expects their timestamps to differ at the nanosecond level, but APFS does not expose sub-millisecond timestamp precision to userspace — both files end up with timestamps that are identical at that resolution, so the assertion fails.

failures:
    test_date_custom_format_supports_nanos_with_length

test result: FAILED. 42 passed; 1 failed; 0 ignored

Expected behavior

The test should either be skipped on platforms that don't provide nanosecond-precision timestamps (macOS, BSD), or rewritten to not rely on filesystem nanosecond resolution.

Suggested fix

Guard the test with #[cfg(not(target_os = "macos"))], or use a synthetic timestamp instead of relying on mtime nanoseconds from std::fs.