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
1 change: 0 additions & 1 deletion src/uu/od/src/od.rs
Original file line number Diff line number Diff line change
Expand Up @@ -255,7 +255,6 @@ pub fn uu_app() -> Command {
.about(translate!("od-about"))
.override_usage(format_usage(&translate!("od-usage")))
.after_help(translate!("od-after-help"))
.trailing_var_arg(true)
.dont_delimit_trailing_values(true)
.infer_long_args(true)
.args_override_self(true)
Expand Down
19 changes: 18 additions & 1 deletion tests/by-util/test_od.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 abcdefghijklmnopqrstuvwxyz Anone
// spell-checker:ignore abcdefghijklmnopqrstuvwxyz Anone fdbb

#[cfg(unix)]
use std::io::Read;
Expand Down Expand Up @@ -975,3 +975,20 @@ fn test_od_invalid_bytes() {
.stderr_only(format!("od: {option} argument '{BIG_SIZE}' too large\n"));
}
}

#[test]
fn test_od_options_after_filename() {
let file = "test";
let (at, mut ucmd) = at_and_ucmd!();
let input: [u8; 4] = [0x68, 0x1c, 0xbb, 0xfd];
at.write_bytes(file, &input);

ucmd.arg(file)
.arg("-v")
.arg("-An")
.arg("-t")
.arg("x2")
.succeeds()
.no_stderr()
.stdout_is(" 1c68 fdbb\n");
}
Loading