From: Jim Meyering Date: Thu, 25 Mar 2004 17:33:56 +0000 (+0000) Subject: (zero-len): Add a test for the above. X-Git-Tag: v5.3.0~1936 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=98529c8bfce16811a4edadcc8b956d79ca10ffd9;p=thirdparty%2Fcoreutils.git (zero-len): Add a test for the above. --- diff --git a/tests/du/files0-from b/tests/du/files0-from index 84c9a57534..d14b33c018 100755 --- a/tests/du/files0-from +++ b/tests/du/files0-from @@ -66,6 +66,14 @@ my @Tests = # two file names, with final NUL ['2a', '--files0-from=-', '<', {IN=>{f=>"g\0g\0"}}, {AUX=>{g=>"x".64*1024}}, {OUT=>"4\tg\n4\tg\n"} ], + + # Ensure that du processes FILEs following a zero-length name. + ['zero-len', '--files0-from=-', '<', + {IN=>{f=>"\0g\0"}}, {AUX=>{g=>"x".64*1024}}, + {OUT=>"4\tg\n"}, + {ERR => "du: -:1: invalid zero-length file name\n"}, + {EXIT=>1} + ], ); my $save_temps = $ENV{DEBUG};