7 $PERL -e 1 > /dev/null 2>&1 || {
8 echo 1>&2 "$0: configure didn't find a usable version of Perl," \
9 "so can't run this test"
16 exec $PERL -w -I$srcdir/.. -MCoreutils -- - <<\EOF
20 (my $program_name = $0) =~ s|.*/||;
22 # Turn off localisation of executable's ouput.
23 @ENV{qw(LANGUAGE LANG LC_ALL)} = ('C') x 3;
25 my $script_name = $ENV{SCRIPT_NAME};
31 qw (bs=1 skip=1 seek=2 conv=notrunc count=3 status=noxfer of=@AUX@ < ),
32 {IN=> '0123456789abcdef'},
33 {AUX=> 'zyxwvutsrqponmlkji'},
35 {ERR=> "3+0 records in\n3+0 records out\n"},
36 {CMP=> ['zy123utsrqponmlkji', {'@AUX@'=> undef}]},
40 qw (bs=5 skip=1 seek=1 conv=notrunc count=1 status=noxfer of=@AUX@ < ),
41 {IN=> '0123456789abcdef'},
42 {AUX=> 'zyxwvutsrqponmlkji'},
44 {ERR=> "1+0 records in\n1+0 records out\n"},
45 {CMP=> ['zyxwv56789ponmlkji', {'@AUX@'=> undef}]},
49 qw (bs=5 skip=1 seek=1 count=1 status=noxfer of=@AUX@ < ),
50 {IN=> '0123456789abcdef'},
51 {AUX=> 'zyxwvutsrqponmlkji'},
53 {ERR=> "1+0 records in\n1+0 records out\n"},
54 {CMP=> ['zyxwv56789', {'@AUX@'=> undef}]},
57 # Before fileutils-4.0.45, the last 10 bytes of output
58 # were these "\0\0\0\0\0\0\0\0 ".
59 'block-sync-1', qw(ibs=10 cbs=10 status=noxfer), 'conv=block,sync', '<',
60 {IN=> "01234567\nabcdefghijkl\n"},
61 {OUT=> "01234567 abcdefghij "},
62 {ERR=> "2+1 records in\n0+1 records out\n1 truncated record\n"},
65 # Before coreutils-5.93, this would output just "c\n".
66 'sk-seek4', qw(bs=1 skip=1 status=noxfer),
69 {ERR=> "3+0 records in\n3+0 records out\n"},
73 my $save_temps = $ENV{DEBUG};
74 my $verbose = $ENV{VERBOSE};
76 my $prog = $ENV{PROG} || die "$0: \$PROG not specified in environment\n";
77 my $fail = run_tests ($program_name, $prog, \@Tests, $save_temps, $verbose);