changeset 38126:0b39edeff033

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
author Augie Fackler <augie@google.com>
date Sat, 19 May 2018 15:15:51 -0400
parents f3776f70985e
children e504fa630860
files tests/test-patch.t
diffstat 1 files changed, 6 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- 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]