Skip to content

Commit

Permalink
tests: mktemp -t: $TMPDIR has higher priority than -p
Browse files Browse the repository at this point in the history
* tests/misc/mktemp.pl: Ensure that with -t,
$TMPDIR has precedence over -p.
  • Loading branch information
sylvestre authored and pixelb committed Jul 4, 2023
1 parent 80a6c7f commit 1ac8630
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tests/misc/mktemp.pl
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,12 @@ ($$)
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...,"},
Expand Down

0 comments on commit 1ac8630

Please sign in to comment.