tests: move "test setup" script into a 'testlib' directory
authorPierre-Yves David <pierre-yves.david@ens-lyon.org>
Tue, 07 Mar 2017 12:04:05 +0100
changeset 2045 db617700d318
parent 2044 d31ad31e456b
child 2046 994d81caec68
tests: move "test setup" script into a 'testlib' directory This will avoid cluttering the tests directory.
tests/test-topic-dest.t
tests/test-topic-push.t
tests/test-topic-stack-data.t
tests/test-topic-stack.t
tests/test-topic-tutorial.t
tests/test-topic.t
tests/testlib
tests/testlib/topic_setup.sh
--- a/tests/test-topic-dest.t	Sat Mar 04 02:56:50 2017 +0100
+++ b/tests/test-topic-dest.t	Tue Mar 07 12:04:05 2017 +0100
@@ -1,4 +1,4 @@
-  $ . "$TESTDIR/testlib"
+  $ . "$TESTDIR/testlib/topic_setup.sh"
 
   $ hg init jungle
   $ cd jungle
--- a/tests/test-topic-push.t	Sat Mar 04 02:56:50 2017 +0100
+++ b/tests/test-topic-push.t	Tue Mar 07 12:04:05 2017 +0100
@@ -1,4 +1,4 @@
-  $ . "$TESTDIR/testlib"
+  $ . "$TESTDIR/testlib/topic_setup.sh"
 
   $ cat << EOF >> $HGRCPATH
   > [ui]
--- a/tests/test-topic-stack-data.t	Sat Mar 04 02:56:50 2017 +0100
+++ b/tests/test-topic-stack-data.t	Tue Mar 07 12:04:05 2017 +0100
@@ -1,7 +1,7 @@
 Setup
 =====
 
-  $ . "$TESTDIR/testlib"
+  $ . "$TESTDIR/testlib/topic_setup.sh"
 
   $ hg init test-list
   $ cd test-list
--- a/tests/test-topic-stack.t	Sat Mar 04 02:56:50 2017 +0100
+++ b/tests/test-topic-stack.t	Tue Mar 07 12:04:05 2017 +0100
@@ -1,4 +1,4 @@
-  $ . "$TESTDIR/testlib"
+  $ . "$TESTDIR/testlib/topic_setup.sh"
 
 Initial setup
 
--- a/tests/test-topic-tutorial.t	Sat Mar 04 02:56:50 2017 +0100
+++ b/tests/test-topic-tutorial.t	Tue Mar 07 12:04:05 2017 +0100
@@ -7,7 +7,7 @@
 
 .. Some Setup::
 
-  $ . "$TESTDIR/testlib"
+  $ . "$TESTDIR/testlib/topic_setup.sh"
   $ hg init server
   $ cd server
   $ cat >> .hg/hgrc << EOF
--- a/tests/test-topic.t	Sat Mar 04 02:56:50 2017 +0100
+++ b/tests/test-topic.t	Tue Mar 07 12:04:05 2017 +0100
@@ -1,4 +1,4 @@
-  $ . "$TESTDIR/testlib"
+  $ . "$TESTDIR/testlib/topic_setup.sh"
 
   $ hg init pinky
   $ cd pinky
--- a/tests/testlib	Sat Mar 04 02:56:50 2017 +0100
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,15 +0,0 @@
-#!/bin/sh
-
-# This file holds logic that is used in many tests.
-# It can be called in a test like this:
-#  $ . "$TESTDIR/testlib"
-
-# Enable obsolete markers and enable extensions
-cat >> $HGRCPATH << EOF
-[experimental]
-evolution=createmarkers,exchange
-
-[extensions]
-rebase=
-EOF
-echo "topic=$(echo $(dirname $TESTDIR))/hgext3rd/topic" >> $HGRCPATH
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/testlib/topic_setup.sh	Tue Mar 07 12:04:05 2017 +0100
@@ -0,0 +1,15 @@
+#!/bin/sh
+
+# This file holds logic that is used in many tests.
+# It can be called in a test like this:
+#  $ . "$TESTDIR/testlib/topic_setup.sh"
+
+# Enable obsolete markers and enable extensions
+cat >> $HGRCPATH << EOF
+[experimental]
+evolution=createmarkers,exchange
+
+[extensions]
+rebase=
+EOF
+echo "topic=$(echo $(dirname $TESTDIR))/hgext3rd/topic" >> $HGRCPATH