1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-29 20:17:45 +00:00

stat: implement support for macos

This commit is contained in:
Jan Scheer 2021-05-03 22:30:56 +02:00
parent 6908413b00
commit 56761ba584
4 changed files with 205 additions and 10 deletions

View file

@ -317,6 +317,20 @@ fn test_multi_files() {
.stdout_is(expected_result(&args));
}
#[cfg(any(target_os = "linux", target_os = "freebsd", target_vendor = "apple"))]
#[test]
fn test_one_file() {
let (at, mut ucmd) = at_and_ucmd!();
let file = "TEST_FILE.mp4";
at.touch(file);
ucmd.arg(file)
.succeeds()
.stdout_contains(format!("File: `{}'", file))
.stdout_contains(format!("Size: 0"))
.stdout_contains(format!("Access: (0644/-rw-r--r--)"));
}
#[test]
#[cfg(target_os = "linux")]
fn test_printf() {