1
Fork 0
mirror of https://github.com/RGBCube/uutils-coreutils synced 2025-07-28 11:37:44 +00:00

od: allow trailing characters in address radix

This commit is contained in:
Andrew Liebenow 2024-08-31 14:13:31 -05:00
parent 8fe93ded74
commit 5ca995b21f
2 changed files with 31 additions and 22 deletions

View file

@ -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
// spell-checker:ignore abcdefghijklmnopqrstuvwxyz Anone
use crate::common::util::TestScenario;
use unindent::unindent;
@ -579,6 +579,19 @@ fn test_invalid_offset() {
new_ucmd!().arg("-Ab").fails();
}
#[test]
fn test_offset_compatibility() {
let input = [0u8; 4];
let expected_output = " 000000 000000\n";
new_ucmd!()
.arg("-Anone")
.run_piped_stdin(input)
.no_stderr()
.success()
.stdout_is(expected_output);
}
#[test]
fn test_skip_bytes() {
let input = "abcdefghijklmnopq";