]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
(block-sync-1): new test, for just-fixed bug
authorJim Meyering <jim@meyering.net>
Mon, 23 Apr 2001 07:31:17 +0000 (07:31 +0000)
committerJim Meyering <jim@meyering.net>
Mon, 23 Apr 2001 07:31:17 +0000 (07:31 +0000)
tests/dd/skip-seek

index a740eb7215ef76b904939860227b340c676ee403..97345a9cc3efd20b40a520c3a371b3cdae2f9cbe 100755 (executable)
@@ -27,7 +27,7 @@ my $script_name = $ENV{SCRIPT_NAME};
 my @Tests =
     (
      [
-      '1', qw (bs=1 skip=1 seek=2 conv=notrunc count=3 of=@AUX@ < ),
+      'skip-seek-1', qw (bs=1 skip=1 seek=2 conv=notrunc count=3 of=@AUX@ < ),
       {IN=> '0123456789abcdef'},
       {AUX=> 'zyxwvutsrqponmlkji'},
       {OUT=> ''},
@@ -35,7 +35,7 @@ my @Tests =
       {CMP=> ['zy123utsrqponmlkji', {'@AUX@'=> undef}]},
      ],
      [
-      '3', qw (bs=5 skip=1 seek=1 conv=notrunc count=1 of=@AUX@ < ),
+      'skip-seek-2', qw (bs=5 skip=1 seek=1 conv=notrunc count=1 of=@AUX@ < ),
       {IN=> '0123456789abcdef'},
       {AUX=> 'zyxwvutsrqponmlkji'},
       {OUT=> ''},
@@ -43,13 +43,21 @@ my @Tests =
       {CMP=> ['zyxwv56789ponmlkji', {'@AUX@'=> undef}]},
      ],
      [
-      '4', qw (bs=5 skip=1 seek=1 count=1 of=@AUX@ < ),
+      'skip-seek-3', qw (bs=5 skip=1 seek=1 count=1 of=@AUX@ < ),
       {IN=> '0123456789abcdef'},
       {AUX=> 'zyxwvutsrqponmlkji'},
       {OUT=> ''},
       {ERR=> "1+0 records in\n1+0 records out\n"},
       {CMP=> ['zyxwv56789', {'@AUX@'=> undef}]},
      ],
+     [
+      # Before fileutils-4.0.45, the last 10 bytes of output
+      # were these "\0\0\0\0\0\0\0\0  ".
+      'block-sync-1', qw(ibs=10 cbs=10), 'conv=block,sync', '<',
+      {IN=> "01234567\nabcdefghijkl\n"},
+      {OUT=> "01234567  abcdefghij          "},
+      {ERR=> "2+1 records in\n0+1 records out\n1 truncated record\n"},
+     ],
     );
 
 my $save_temps = $ENV{DEBUG};