From: Sylvestre Ledru Date: Mon, 3 Jul 2023 21:37:11 +0000 (+0200) Subject: tests: mktemp -t: $TMPDIR has higher priority than -p X-Git-Tag: v9.4~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=1ac8630f1eed599e84f5a45f3eb14ae32546ac94;p=thirdparty%2Fcoreutils.git tests: mktemp -t: $TMPDIR has higher priority than -p * tests/misc/mktemp.pl: Ensure that with -t, $TMPDIR has precedence over -p. --- diff --git a/tests/misc/mktemp.pl b/tests/misc/mktemp.pl index 52f262b588..01dcf61497 100755 --- a/tests/misc/mktemp.pl +++ b/tests/misc/mktemp.pl @@ -183,6 +183,12 @@ my @Tests = check_tmp $f, 'F'; unlink $f; rmdir 'a' or die "rmdir a: $!\n" }} ], + ['priority-t-tmpdir', "-t -p $bad_dir foo.XXX", + {ENV=>"TMPDIR=."}, + {OUT_SUBST => 's,....$,.ZZZ,'}, + {OUT => "./foo.ZZZ\n"}, + ], + ['pipe-bad-tmpdir', {ENV => "TMPDIR=$bad_dir"}, {ERR_SUBST => "s,($bad_dir/)[^']+': .*,\$1...,"},