tests: avoid non-portable sed command
authorJoerg Sonnenberger <joerg@bec.de>
Thu, 09 Apr 2020 19:52:30 +0200
changeset 5319 6a4a65edecdc
parent 5318 a799f5d228f1
child 5320 1227553f82c6
tests: avoid non-portable sed command sed -i is a GNU extension and the i command without newline as well. Just create the file from scratch with printf to side-step the issue.
tests/test-evolve-public-content-divergent-main.t
--- a/tests/test-evolve-public-content-divergent-main.t	Thu Apr 09 19:51:03 2020 +0200
+++ b/tests/test-evolve-public-content-divergent-main.t	Thu Apr 09 19:52:30 2020 +0200
@@ -43,7 +43,7 @@
 
 Make an amend and change phase to public:
 
-  $ sed -i "1 i I am first" b
+  $ printf "I am first\nb\n" > b
   $ hg amend
   $ hg phase --public