t0061: do not fail test if '.' is part of $PATH
commit89ba9a79ae3a4d828880cdcdc1b5f6aa92be662c
authorJunio C Hamano <gitster@pobox.com>
Mon, 3 Dec 2018 01:05:07 +0000 (3 10:05 +0900)
committerJunio C Hamano <gitster@pobox.com>
Mon, 3 Dec 2018 01:05:07 +0000 (3 10:05 +0900)
tree53941cc81a2ae58bd6a51e68d7d2425918cebfe9
parent321fd82389742398d2924640ce3a61791fd27d60
t0061: do not fail test if '.' is part of $PATH

t0061 creates a script with an unlikely name in the current
directory and asks the run_command() API to run it without an
explicit path, expecting that the script does *not* get run.  This
obviously would not work if the $PATH does contain such an element.

Check if the running shell picks up the script without an explicit
path to it, and skip the test when it does, as the run_command() API
should also run the script in such an (insane) environment.

Reported-by: "H.Merijn Brand" <h.m.brand@xs4all.nl>
Helped-by: Johannes Schindelin <Johannes.Schindelin@gmx.de>
Helped-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
t/t0061-run-command.sh