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". -- brian m. carlson (he/him or they/them) Toronto, Ontario, CA
Attachment:
signature.asc
Description: PGP signature