mirror of
https://github.com/uutils/coreutils
synced 2024-12-14 07:12:44 +00:00
commit
af8e820b5e
2 changed files with 30 additions and 2 deletions
|
@ -3369,7 +3369,6 @@ fn display_inode(metadata: &Metadata) -> String {
|
|||
|
||||
// This returns the SELinux security context as UTF8 `String`.
|
||||
// In the long term this should be changed to `OsStr`, see discussions at #2621/#2656
|
||||
#[allow(unused_variables)]
|
||||
fn get_security_context(config: &Config, p_buf: &Path, must_dereference: bool) -> String {
|
||||
let substitute_string = "?".to_string();
|
||||
// If we must dereference, ensure that the symlink is actually valid even if the system
|
||||
|
@ -3383,7 +3382,7 @@ fn get_security_context(config: &Config, p_buf: &Path, must_dereference: bool) -
|
|||
show!(LsError::IOErrorContext(err, p_buf.to_path_buf(), false));
|
||||
return substitute_string;
|
||||
}
|
||||
Ok(md) => (),
|
||||
Ok(_md) => (),
|
||||
}
|
||||
}
|
||||
if config.selinux_supported {
|
||||
|
|
|
@ -2992,6 +2992,35 @@ fn test_ls_align_unquoted() {
|
|||
}
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_ls_align_unquoted_multiline() {
|
||||
let scene = TestScenario::new(util_name!());
|
||||
let at = &scene.fixtures;
|
||||
|
||||
at.touch("one");
|
||||
at.touch("two");
|
||||
at.touch("three_long");
|
||||
at.touch("four_long");
|
||||
at.touch("five");
|
||||
at.touch("s ix");
|
||||
at.touch("s even");
|
||||
at.touch("eight_long_long");
|
||||
at.touch("nine");
|
||||
at.touch("ten");
|
||||
|
||||
// In TTY
|
||||
#[cfg(unix)]
|
||||
scene
|
||||
.ucmd()
|
||||
.arg("--color")
|
||||
.terminal_simulation(true)
|
||||
.succeeds()
|
||||
.stdout_only(concat!(
|
||||
" eight_long_long four_long one 's ix' three_long\r\n",
|
||||
" five nine 's even' ten two\r\n"
|
||||
));
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_ls_ignore_hide() {
|
||||
let scene = TestScenario::new(util_name!());
|
||||
|
|
Loading…
Reference in a new issue