"brian m. carlson" <sandals@xxxxxxxxxxxxxxxxxxxx> writes: > On 2023-06-22 at 21:05:39, Junio C Hamano wrote: >> Correct. I also suspect that we want to add test_path_is_executable >> helper next to test_path_is_{file,dir,missing} helpers and list it >> in t/README. One downside of your approach is that the output from >> the command is only in $shpath and cannot be observed easily in the >> $TRASH_DIRECTORY after the test fails, but with such a helper we can >> report the problematic path when the expectation fails. > > At first glance, I thought that was a good idea, too, but unfortunately > there is no way to make that work on Windows. That's why all of our > tests skip those assertions with POSIXPERM, and why my tests > specifically look for something different on Windows. > > We could in theory just make it always succeed there, but my concern > with writing such a function is that people will think it works > generally, when in fact it does not. That's why, typically throughout > the codebase, we specifically use "test -x". Hmph. I would have thought that test_path_is_executable that is based on "test -x" and gives a diagnosis when "test -x" fails would be better than using bare "test -x" and be silent, even on Windows.