mirror of
https://github.com/coreutils/coreutils.git
synced 2026-10-28 09:44:34 +08:00
tests: od: check the offset width with -S
* tests/od/od.pl (@Tests): Add test cases for -S with -Ax, -Ad and -Ao, ensuring hexadecimal offsets use 6 digits as in the normal dump. https://github.com/uutils/coreutils/pull/15625 Link: https://github.com/coreutils/coreutils/pull/393
This commit is contained in:
1 parent
da597e49b4
commit
4c91290e2d
1 file changed
+8
@@ -107,6 +107,14 @@ my @Tests =
|
||||
{ERR=>"$prog: invalid -j argument 'a\\t'\n"}],
|
||||
['bad-j-quote-2', "-j '1\t'", {IN=>""}, {EXIT=>1},
|
||||
{ERR=>"$prog: invalid suffix in -j argument '1\\t'\n"}],
|
||||
|
||||
# With -S, offsets use the same width as in the normal dump.
|
||||
['S-Ax', '-Ax -S3', {IN=>"\001hello\000world\000ab\000"},
|
||||
{OUT=>"000001 hello\n000007 world\n"}],
|
||||
['S-Ad', '-Ad -S3', {IN=>"\001hello\000world\000ab\000"},
|
||||
{OUT=>"0000001 hello\n0000007 world\n"}],
|
||||
['S-Ao', '-Ao -S3', {IN=>"\001hello\000world\000ab\000"},
|
||||
{OUT=>"0000001 hello\n0000007 world\n"}],
|
||||
);
|
||||
|
||||
push @Tests,
|
||||
|
||||
Reference in new issue
Block a user