Skip to content

fix(tests): skip nanos test on non-Linux (APFS lacks precision) - #1226

Open
MeGaurav4 wants to merge 1 commit into
lsd-rs:mainfrom
MeGaurav4:main
Open

fix(tests): skip nanos test on non-Linux (APFS lacks precision)#1226
MeGaurav4 wants to merge 1 commit into
lsd-rs:mainfrom
MeGaurav4:main

Conversation

@MeGaurav4

Copy link
Copy Markdown

Fixes #1223. Skips test_date_custom_format_supports_nanos_with_length on non-Linux platforms where the filesystem does not expose sub-millisecond timestamp precision (APFS on macOS). Uses the same #[cfg(target_os = "linux")] pattern already established in this file.

Test passes on Linux (1/1). On macOS the test will be silently skipped.

Verification

  • cargo test test_date_custom_format_supports_nanos_with_length passes on Linux
  • Build succeeds on all platforms

The test_date_custom_format_supports_nanos_with_length test relies on sub-millisecond filesystem timestamps, which APFS (macOS) does not expose. Add #[cfg(target_os = "linux")] to match the existing pattern for platform-dependent tests.
@MeGaurav4
MeGaurav4 requested a review from zwpaper as a code owner July 26, 2026 09:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

test_date_custom_format_supports_nanos_with_length fails on macOS (aarch64-darwin)

1 participant