mirror of
https://github.com/RGBCube/uutils-coreutils
synced 2025-07-28 11:37:44 +00:00
ls: silently ignore -T
option (#3718)
* ls: silently ignore `-T` option
This commit is contained in:
parent
eeb4cdab58
commit
4e72e284b5
2 changed files with 45 additions and 2 deletions
|
@ -1,4 +1,4 @@
|
|||
// spell-checker:ignore (words) READMECAREFULLY birthtime doesntexist oneline somebackup lrwx somefile somegroup somehiddenbackup somehiddenfile
|
||||
// spell-checker:ignore (words) READMECAREFULLY birthtime doesntexist oneline somebackup lrwx somefile somegroup somehiddenbackup somehiddenfile tabsize aaaaaaaa bbbb cccc dddddddd ncccc
|
||||
|
||||
#[cfg(not(windows))]
|
||||
extern crate libc;
|
||||
|
@ -3117,3 +3117,36 @@ fn test_dereference_symlink_file_color() {
|
|||
.succeeds()
|
||||
.stdout_is(out_exp);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_tabsize_option() {
|
||||
let scene = TestScenario::new(util_name!());
|
||||
|
||||
scene.ucmd().args(&["-T", "3"]).succeeds();
|
||||
scene.ucmd().args(&["--tabsize", "0"]).succeeds();
|
||||
scene.ucmd().arg("-T").fails();
|
||||
}
|
||||
|
||||
#[ignore = "issue #3624"]
|
||||
#[test]
|
||||
fn test_tabsize_formatting() {
|
||||
let (at, mut ucmd) = at_and_ucmd!();
|
||||
|
||||
at.touch("aaaaaaaa");
|
||||
at.touch("bbbb");
|
||||
at.touch("cccc");
|
||||
at.touch("dddddddd");
|
||||
|
||||
ucmd.args(&["-T", "4"])
|
||||
.succeeds()
|
||||
.stdout_is("aaaaaaaa bbbb\ncccc\t dddddddd");
|
||||
|
||||
ucmd.args(&["-T", "2"])
|
||||
.succeeds()
|
||||
.stdout_is("aaaaaaaa bbbb\ncccc\t\t dddddddd");
|
||||
|
||||
// use spaces
|
||||
ucmd.args(&["-T", "0"])
|
||||
.succeeds()
|
||||
.stdout_is("aaaaaaaa bbbb\ncccc dddddddd");
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue