From: Eric Blake Date: Thu, 5 Nov 2009 15:36:09 +0000 (-0700) Subject: mktemp: enhance test to catch just-fixed typo behavior X-Git-Tag: v8.1~31 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=20e5a0d562cf698fab7be3d04c5f1c356faa2dbb;p=thirdparty%2Fcoreutils.git mktemp: enhance test to catch just-fixed typo behavior Penance for botching the conflict resolution while rebasing my series. * tests/misc/mktemp (check_tmp): Test for the bug when wrong parameter is used. --- diff --git a/tests/misc/mktemp b/tests/misc/mktemp index 7735f33d19..e49643f349 100755 --- a/tests/misc/mktemp +++ b/tests/misc/mktemp @@ -85,9 +85,10 @@ my @Tests = # Use a template consisting solely of X's ['1d-allX', '-d XXXX', {OUT => "ZZZZ\n"}, + {PRE => sub {mkdir 'XXXX',0755 or die "XXXX: $!\n"}}, {OUT_SUBST => 's,^....$,ZZZZ,'}, {POST => sub { my ($f) = @_; defined $f or return; chomp $f; - check_tmp $f, 'D'; }} + check_tmp $f, 'D'; rmdir 'XXXX' or die "rmdir XXXX: $!\n"; }} ], # Test -u