# HG changeset patch # User Pierre-Yves David # Date 1488884645 -3600 # Node ID db617700d31867c3dfef865284efab2c2f6bc7eb # Parent d31ad31e456b557bf86f6476a6afec43110a941a tests: move "test setup" script into a 'testlib' directory This will avoid cluttering the tests directory. diff -r d31ad31e456b -r db617700d318 tests/test-topic-dest.t --- 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 diff -r d31ad31e456b -r db617700d318 tests/test-topic-push.t --- 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] diff -r d31ad31e456b -r db617700d318 tests/test-topic-stack-data.t --- 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 diff -r d31ad31e456b -r db617700d318 tests/test-topic-stack.t --- 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 diff -r d31ad31e456b -r db617700d318 tests/test-topic-tutorial.t --- 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 diff -r d31ad31e456b -r db617700d318 tests/test-topic.t --- 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 diff -r d31ad31e456b -r db617700d318 tests/testlib --- 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 diff -r d31ad31e456b -r db617700d318 tests/testlib/topic_setup.sh --- /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