mirror of
https://github.com/uutils/coreutils.git
synced 2026-06-10 15:48:22 -07:00
od: fix options after filename issue (#8624)
* od: fix options after filename issue * fix cspell issue
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user