test_date_custom_format_supports_nanos_with_length fails on macOS (aarch64-darwin)
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 16.2k
- Forks
- 510
- PR merge metrics
- No merged PRs in 30d
Description
### 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`.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the integration test `test_date_custom_format_supports_nanos_with_length` and run it on macOS to reproduce the timestamp-resolution failure. Review how it creates files and reads their mtime values, then either guard the test for unsupported platforms or replace the filesystem-dependent timestamp with a synthetic value. Done means the test passes on supported platforms without failing on macOS or BSD.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- testing-qa
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100