summaryrefslogtreecommitdiff
path: root/tests.branching/branch-when-branchdir-exists-locally.script
diff options
context:
space:
mode:
authorLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-03-22 18:41:52 +0000
committerLars Wirzenius <lars.wirzenius@codethink.co.uk>2012-03-22 18:41:52 +0000
commit988a23bc269eb181b26ee8ad9a2bfb8c534e5c72 (patch)
tree4bbfd9a2941c5b228c50947158d90354729c7c9d /tests.branching/branch-when-branchdir-exists-locally.script
parentb64a08879c6c6c7e57625ce8c339ce33af193cc4 (diff)
downloadmorph-988a23bc269eb181b26ee8ad9a2bfb8c534e5c72.tar.gz
Add test for "morph branch" when system branch directory already exists
Diffstat (limited to 'tests.branching/branch-when-branchdir-exists-locally.script')
-rwxr-xr-xtests.branching/branch-when-branchdir-exists-locally.script27
1 files changed, 27 insertions, 0 deletions
diff --git a/tests.branching/branch-when-branchdir-exists-locally.script b/tests.branching/branch-when-branchdir-exists-locally.script
new file mode 100755
index 00000000..4692b5f6
--- /dev/null
+++ b/tests.branching/branch-when-branchdir-exists-locally.script
@@ -0,0 +1,27 @@
+#!/bin/sh
+# Copyright (C) 2012 Codethink Limited
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; version 2 of the License.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License along
+# with this program; if not, write to the Free Software Foundation, Inc.,
+# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+
+# Make sure "morph branch" fails when the system branch directory already
+# exists.
+
+set -eu
+
+cd "$DATADIR/mine"
+"$SRCDIR/scripts/test-morph" init
+
+mkdir newbranch
+"$SRCDIR/scripts/test-morph" branch newbranch
+