summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2022-02-21 11:23:02 -0800
committerPaul Eggert <eggert@cs.ucla.edu>2022-02-22 09:04:27 -0800
commit4439ef3ec43f53ff513522db644bc53de935ab3d (patch)
tree4b9a094c66d19167568f4e6407d1bfb13b1a8577 /tests
parent3f7519130a3702b69e9505611a39f2791de0d3b1 (diff)
downloadcoreutils-4439ef3ec43f53ff513522db644bc53de935ab3d.tar.gz
dd: support iseek= and oseek=
Alias iseek=N to skip=N, oseek=N to seek=N (Bug#45648). * src/dd.c (scanargs): Parse iseek= and oseek=. * tests/dd/skip-seek.pl (sk-seek5): New test case.
Diffstat (limited to 'tests')
-rwxr-xr-xtests/dd/skip-seek.pl10
1 files changed, 10 insertions, 0 deletions
diff --git a/tests/dd/skip-seek.pl b/tests/dd/skip-seek.pl
index 41639cc71..0fcb1cf25 100755
--- a/tests/dd/skip-seek.pl
+++ b/tests/dd/skip-seek.pl
@@ -68,6 +68,16 @@ my @Tests =
{OUT=> "bc\n"},
{ERR=> "3+0 records in\n3+0 records out\n"},
],
+ [
+ # Check that iseek and oseek aliases work too.
+ 'sk-seek5',
+ qw (bs=1 iseek=1 oseek=2 conv=notrunc count=3 status=noxfer of=@AUX@ < ),
+ {IN=> '0123456789abcdef'},
+ {AUX=> 'zyxwvutsrqponmlkji'},
+ {OUT=> ''},
+ {ERR=> "3+0 records in\n3+0 records out\n"},
+ {CMP=> ['zy123utsrqponmlkji', {'@AUX@'=> undef}]},
+ ],
);
my $save_temps = $ENV{DEBUG};