tests: fix test-patch.t on pickier /bin/sh implementations
FreeBSD sh(1) doesn't accept -d, so we weren't testing what we
expected there. Let's just use a simple Python script instead.
Differential Revision: https://phab.mercurial-scm.org/D3620
--- a/tests/test-patch.t Sat May 19 15:14:56 2018 -0400
+++ b/tests/test-patch.t Sat May 19 15:15:51 2018 -0400
@@ -92,7 +92,12 @@
Error exit (issue4746)
- $ hg import ../c/p --config ui.patch='sh -c "exit 1"'
+ $ cat >> exit1.py <<EOF
+ > import sys
+ > sys.exit(1)
+ > EOF
+
+ $ hg import ../c/p --config ui.patch="$PYTHON '`pwd`/exit1.py'"
applying ../c/p
abort: patch command failed: exited with status 1
[255]