Skip to content
Open
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
1 change: 1 addition & 0 deletions src/uu/stat/locales/en-US.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ stat-word-block = Block
stat-word-size = Size
stat-word-fundamental = Fundamental
stat-word-block-size = block size
stat-word-block-size-capitalized = Block size
stat-word-blocks = Blocks
stat-word-total = Total
stat-word-free = Free
Expand Down
1 change: 1 addition & 0 deletions src/uu/stat/locales/fr-FR.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ stat-word-block = Bloc
stat-word-size = Taille
stat-word-fundamental = Fondamentale
stat-word-block-size = taille bloc
stat-word-block-size-capitalized = Taille bloc
stat-word-blocks = Blocs
stat-word-total = Total
stat-word-free = Libres
Expand Down
7 changes: 3 additions & 4 deletions src/uu/stat/src/stat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1428,15 +1428,14 @@ impl Stater {
"%n %i %l %t %s %S %b %f %a %c %d\n".into()
} else {
format!(
" {}: \"%n\"\n {}: %-8i {}: %-7l {}: %T\n{} \
{}: %-10s {} {}: %S\n{}: {}: %-10b \
" {}: \"%n\"\n {}: %-8i {}: %-7l {}: %T\n{}: %-10s \
{} {}: %S\n{}: {}: %-10b \
{}: %-10f {}: %a\n{}: {}: %-10c {}: %d\n",
translate!("stat-word-file"),
translate!("stat-word-id"),
translate!("stat-word-namelen"),
translate!("stat-word-type"),
translate!("stat-word-block"),
translate!("stat-word-size"),
translate!("stat-word-block-size-capitalized"),
translate!("stat-word-fundamental"),
translate!("stat-word-block-size"),
translate!("stat-word-blocks"),
Expand Down
12 changes: 12 additions & 0 deletions tests/by-util/test_stat.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,18 @@ fn test_fs_format() {
ts.ucmd().args(&args).succeeds().stdout_is(expected_stdout);
}

#[test]
// `stat -f` is only implemented for these targets; elsewhere `fs_type` is
// still `unimplemented!()`.
#[cfg(any(target_os = "linux", target_os = "android"))]
fn test_fs_default_format_block_size_label() {
// GNU prints "Block size:", not "Block Size:".
new_ucmd!()
.args(&["-f", "/"])
.succeeds()
.stdout_contains("Block size:");
}

#[cfg(unix)]
#[test]
fn test_terse_normal_format() {
Expand Down
Loading