tests: fix test-patch.t on pickier /bin/sh implementations
authorAugie Fackler <augie@google.com>
Sat, 19 May 2018 15:15:51 -0400
changeset 38093 0b39edeff033
parent 38092 f3776f70985e
child 38094 e504fa630860
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
tests/test-patch.t
--- 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]