tests: extract obshistory setup in a separate file
authorBoris Feld <boris.feld@octobus.net>
Tue, 22 May 2018 15:35:54 +0200
changeset 3885 3df8b6ecce2a
parent 3884 16bec7609a08
child 3886 8f27e17c3558
tests: extract obshistory setup in a separate file We are gonna soon explode the obshistory test file into several, extract the setup to reuse it as much as possible.
tests/test-evolve-obshistory.t
tests/testlib/obshistory_setup.sh
--- a/tests/test-evolve-obshistory.t	Tue May 22 12:07:24 2018 +0200
+++ b/tests/test-evolve-obshistory.t	Tue May 22 15:35:54 2018 +0200
@@ -4,17 +4,7 @@
 Global setup
 ============
 
-  $ . $TESTDIR/testlib/common.sh
-  $ cat >> $HGRCPATH <<EOF
-  > [ui]
-  > interactive = true
-  > [phases]
-  > publish=False
-  > [extensions]
-  > evolve =
-  > [experimental]
-  > evolution.effect-flags = yes
-  > EOF
+  $ . $TESTDIR/testlib/obshistory_setup.sh
 
 Test simple common cases
 ========================
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/testlib/obshistory_setup.sh	Tue May 22 15:35:54 2018 +0200
@@ -0,0 +1,12 @@
+. $TESTDIR/testlib/common.sh
+
+cat >> $HGRCPATH <<EOF
+[ui]
+interactive = true
+[phases]
+publish=False
+[extensions]
+evolve =
+[experimental]
+evolution.effect-flags = yes
+EOF