Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions src/uu/ls/src/ls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
// For the full copyright and license information, please view the LICENSE
// 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::{
builder::{NonEmptyStringValueParser, ValueParser},
Expand Down Expand Up @@ -2395,10 +2395,10 @@ fn display_grid(
writeln!(out)?;
}
} else {
let mut grid = Grid::new(GridOptions {
filling: Filling::Spaces(2),
direction,
});
// TODO: To match gnu/tests/ls/stat-dtype.sh
// we might want to have Filling::Text("\t".to_string());
let filling = Filling::Spaces(2);
let mut grid = Grid::new(GridOptions { filling, direction });

for name in names {
grid.add(name);
Expand Down
14 changes: 14 additions & 0 deletions tests/by-util/test_ls.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3678,3 +3678,17 @@ fn test_ls_dired_complex() {
println!("Extracted filenames: {:?}", filenames);
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");
}