diff --git a/src/uu/od/src/od.rs b/src/uu/od/src/od.rs index 2dac86d2e28..e4a8ce108d9 100644 --- a/src/uu/od/src/od.rs +++ b/src/uu/od/src/od.rs @@ -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) diff --git a/tests/by-util/test_od.rs b/tests/by-util/test_od.rs index 2d76a8dd8b3..4ee31823e43 100644 --- a/tests/by-util/test_od.rs +++ b/tests/by-util/test_od.rs @@ -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; @@ -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"); +}