mirror of
https://github.com/Llewellynvdm/exa.git
synced 2024-11-22 12:05:11 +00:00
Fix tests
This commit is contained in:
parent
5503e4756e
commit
13b3635407
@ -594,10 +594,8 @@ mod filename_test {
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn topmost() {
|
||||
#[cfg(unix)]
|
||||
fn topmost() {
|
||||
assert_eq!("/", File::filename(Path::new("/")));
|
||||
#[cfg(windows)]
|
||||
assert_eq!("C:\\", File::filename(Path::new("C:\\")));
|
||||
}
|
||||
}
|
||||
|
@ -185,7 +185,6 @@ pub enum SortField {
|
||||
///
|
||||
/// In original Unix, this was, however, meant as creation time.
|
||||
/// https://www.bell-labs.com/usr/dmr/www/cacm.html
|
||||
#[cfg(unix)]
|
||||
ChangedDate,
|
||||
|
||||
/// The time the file was created (the “btime” or “birthtime”).
|
||||
@ -257,7 +256,6 @@ impl SortField {
|
||||
Self::FileInode => a.metadata.ino().cmp(&b.metadata.ino()),
|
||||
Self::ModifiedDate => a.modified_time().cmp(&b.modified_time()),
|
||||
Self::AccessedDate => a.accessed_time().cmp(&b.accessed_time()),
|
||||
#[cfg(unix)]
|
||||
Self::ChangedDate => a.changed_time().cmp(&b.changed_time()),
|
||||
Self::CreatedDate => a.created_time().cmp(&b.created_time()),
|
||||
Self::ModifiedAge => b.modified_time().cmp(&a.modified_time()), // flip b and a
|
||||
|
@ -78,15 +78,12 @@ impl SortField {
|
||||
"age" | "old" | "oldest" => {
|
||||
Self::ModifiedAge
|
||||
}
|
||||
#[cfg(unix)]
|
||||
"ch" | "changed" => {
|
||||
Self::ChangedDate
|
||||
}
|
||||
#[cfg(unix)]
|
||||
"acc" | "accessed" => {
|
||||
Self::AccessedDate
|
||||
}
|
||||
#[cfg(unix)]
|
||||
"cr" | "created" => {
|
||||
Self::CreatedDate
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user