Skip to content

fmt: --goal produces different output than GNU fmt #5162

@cakebaker

Description

@cakebaker

When using -g/--goal, the output differs between uutils fmt and GNU fmt:

// uutils fmt
$ cargo run fmt tests/fixtures/fmt/one-word-per-line.txt --goal=7
this is
a file
with one
word per
line

// GNU fmt
$ fmt tests/fixtures/fmt/one-word-per-line.txt --goal=7
this is a
file with one
word per line

A test case for this issue was added in https://github.com/uutils/coreutils/pull/5159/files

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions