mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
ls: On Windows use DirEntry#metadata() instead of fs::metadata
This commit is contained in:
parent
63ef039b4f
commit
5659bf8fae
2 changed files with 36 additions and 2 deletions
|
@ -1642,6 +1642,41 @@ fn test_ls_hidden_windows() {
|
|||
scene.ucmd().arg("-a").succeeds().stdout_contains(file);
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[test]
|
||||
fn test_ls_hidden_link_windows() {
|
||||
let scene = TestScenario::new(util_name!());
|
||||
let at = &scene.fixtures;
|
||||
|
||||
let file = "visibleWindowsFileNoDot";
|
||||
at.touch(file);
|
||||
|
||||
let link = "hiddenWindowsLinkNoDot";
|
||||
at.symlink_dir(file, link);
|
||||
// hide the link
|
||||
scene.cmd("attrib").arg("/l").arg("+h").arg(link).succeeds();
|
||||
|
||||
scene
|
||||
.ucmd()
|
||||
.succeeds()
|
||||
.stdout_contains(file)
|
||||
.stdout_does_not_contain(link);
|
||||
|
||||
scene
|
||||
.ucmd()
|
||||
.arg("-a")
|
||||
.succeeds()
|
||||
.stdout_contains(file)
|
||||
.stdout_contains(link);
|
||||
}
|
||||
|
||||
#[cfg(windows)]
|
||||
#[test]
|
||||
fn test_ls_success_on_c_drv_root_windows() {
|
||||
let scene = TestScenario::new(util_name!());
|
||||
scene.ucmd().arg("C:\\").succeeds();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_ls_version_sort() {
|
||||
let scene = TestScenario::new(util_name!());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue