From: Paul Eggert Date: Thu, 23 Sep 2004 20:30:54 +0000 (+0000) Subject: New test case obs-b. X-Git-Tag: v5.3.0~610 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bc5655bc3cba2744585df15ad61539128859ca2;p=thirdparty%2Fcoreutils.git New test case obs-b. err-[134] no longer need _POSIX2_VERSION=199209. Fix comments to match revised 'tail' behavior. --- diff --git a/tests/tail/Test.pm b/tests/tail/Test.pm index 5904f6d9b7..69670c3609 100755 --- a/tests/tail/Test.pm +++ b/tests/tail/Test.pm @@ -32,21 +32,25 @@ my @tv = ( # With no number, this is like -10l ['obs-l', '-l', "x\n" . ("y\n" x 10) . 'z', ("y\n" x 9) . 'z', 0], -# This should get `tail: +cl: No such file or directory' +['obs-b', '-b', "x\n" x (512 * 10 / 2 + 1), "x\n" x (512 * 10 / 2), 0], + +# This should get +# `tail: cannot open `+cl' for reading: No such file or directory' ['err-1', '+cl', '', '', 1], # This should get `tail: l: invalid number of bytes' ['err-2', '-cl', '', '', 1], -# This should get `tail: z: invalid suffix character in obsolescent option' +# This should get +# `tail: cannot open `+2cz' for reading: No such file or directory' ['err-3', '+2cz', '', '', 1], -# This should get `tail: X: invalid suffix character in obsolescent option' +# This should get `tail: invalid option -- 2' ['err-4', '-2cX', '', '', 1], # Since the number is larger than 2^64, this should provoke -# the diagnostic: `tail: 99999999999999999999: number of bytes is so large \ -# that it is not representable' on all systems... probably, for now, maybe. +# the diagnostic: `tail: 99999999999999999999: invalid number of bytes' +# on all systems... probably, for now, maybe. ['err-5', '-c99999999999999999999', '', '', 1], ['err-6', '-c', '', '', 1], @@ -79,7 +83,7 @@ sub test_vector { my ($test_name, $flags, $in, $exp, $ret) = @$t; - $test_name =~ /^(obs|err-[134]|minus-)/ + $test_name =~ /^(obs|minus-)/ and $Test::env{$test_name} = ['_POSIX2_VERSION=199209']; # If you run the minus* tests with a FILE arg they'd hang.