mirror of
https://github.com/uutils/coreutils
synced 2025-01-20 17:14:21 +00:00
Merge pull request #5397 from sylvestre/ls-42
ls: Document a bit tests/ls/stat-dtype.sh
This commit is contained in:
commit
617de9b636
2 changed files with 19 additions and 5 deletions
|
@ -3,7 +3,7 @@
|
||||||
// For the full copyright and license information, please view the LICENSE
|
// For the full copyright and license information, please view the LICENSE
|
||||||
// file that was distributed with this source code.
|
// file that was distributed with this source code.
|
||||||
|
|
||||||
// spell-checker:ignore (ToDO) cpio svgz webm somegroup nlink rmvb xspf tabsize dired subdired
|
// spell-checker:ignore (ToDO) cpio svgz webm somegroup nlink rmvb xspf tabsize dired subdired dtype
|
||||||
|
|
||||||
use clap::{
|
use clap::{
|
||||||
builder::{NonEmptyStringValueParser, ValueParser},
|
builder::{NonEmptyStringValueParser, ValueParser},
|
||||||
|
@ -2395,10 +2395,10 @@ fn display_grid(
|
||||||
writeln!(out)?;
|
writeln!(out)?;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
let mut grid = Grid::new(GridOptions {
|
// TODO: To match gnu/tests/ls/stat-dtype.sh
|
||||||
filling: Filling::Spaces(2),
|
// we might want to have Filling::Text("\t".to_string());
|
||||||
direction,
|
let filling = Filling::Spaces(2);
|
||||||
});
|
let mut grid = Grid::new(GridOptions { filling, direction });
|
||||||
|
|
||||||
for name in names {
|
for name in names {
|
||||||
grid.add(name);
|
grid.add(name);
|
||||||
|
|
|
@ -3678,3 +3678,17 @@ fn test_ls_dired_complex() {
|
||||||
println!("Extracted filenames: {:?}", filenames);
|
println!("Extracted filenames: {:?}", filenames);
|
||||||
assert_eq!(filenames, vec!["a1", "a22", "a333", "a4444", "d"]);
|
assert_eq!(filenames, vec!["a1", "a22", "a333", "a4444", "d"]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[ignore = "issue #5396"]
|
||||||
|
#[test]
|
||||||
|
fn test_ls_cf_output_should_be_delimited_by_tab() {
|
||||||
|
let (at, mut ucmd) = at_and_ucmd!();
|
||||||
|
|
||||||
|
at.mkdir("e");
|
||||||
|
at.mkdir("e/a2345");
|
||||||
|
at.mkdir("e/b");
|
||||||
|
|
||||||
|
ucmd.args(&["-CF", "e"])
|
||||||
|
.succeeds()
|
||||||
|
.stdout_is("a2345/\tb/\n");
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue