You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
tests: fix flaky ls tests that depend on filesystem directory order
The tests test_f_flag_disables_sorting, test_big_u_overrides_f_sort, and test_f_overrides_sort_flags made incorrect assumptions that unsorted directory order would always differ from sorted order. However, fs::read_dir() returns entries in filesystem-dependent order which may accidentally match sorted order on some filesystems. Changes: - Removed assertions comparing unsorted vs sorted outputs - Added deterministic checks (e.g., verifying --sort after -f works) - Added explicit order verification for size-sorted outputs - Tests now verify flag precedence without relying on directory order Fixes CI failures on Windows and SELinux platforms. Quality checks passed: - cargo fmt --check: ✓ - cargo clippy --test tests: ✓ - all 3 modified tests pass: ✓
0 commit comments