git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: "Karl Hasselström" <kha@treskal.com>
To: Catalin Marinas <catalin.marinas@gmail.com>
Cc: git@vger.kernel.org, "Aneesh Kumar" <aneesh.kumar@gmail.com>,
	"Karl Hasselström" <kha@treskal.com>
Subject: [StGit PATCH 4/4] Add simple test for "stg branch --delete"
Date: Sat, 22 Sep 2007 10:46:36 +0200	[thread overview]
Message-ID: <20070922084636.29884.36503.stgit@yoghurt> (raw)
In-Reply-To: <20070922084334.29884.60506.stgit@yoghurt>

Signed-off-by: Karl Hasselström <kha@treskal.com>

---

 t/t1005-branch-delete.sh |   29 +++++++++++++++++++++++++++++
 1 files changed, 29 insertions(+), 0 deletions(-)
 create mode 100755 t/t1005-branch-delete.sh


diff --git a/t/t1005-branch-delete.sh b/t/t1005-branch-delete.sh
new file mode 100755
index 0000000..7a0872e
--- /dev/null
+++ b/t/t1005-branch-delete.sh
@@ -0,0 +1,29 @@
+#!/bin/sh
+
+test_description='Attempt to delete branches'
+
+. ./test-lib.sh
+
+stg init
+
+test_expect_success 'Create a branch (and switch to it)' '
+    stg branch --create foo
+    '
+
+test_expect_success 'Delete a branch' '
+    stg branch --delete master
+    '
+
+test_expect_success 'Make sure the branch ref was deleted' '
+    [ -z "$(git show-ref | grep master | tee /dev/stderr)" ]
+    '
+
+test_expect_success 'Make sure the branch config was deleted' '
+    [ -z "$(git config -l | grep branch\\.master | tee /dev/stderr)" ]
+    '
+
+test_expect_success 'Make sure the branch files were deleted' '
+    [ -z "$(find .git -type f | grep master | tee /dev/stderr)" ]
+    '
+
+test_done

      parent reply	other threads:[~2007-09-22  8:46 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-21  4:40 stg branch --delete doesn't work Aneesh Kumar
2007-09-21  9:48 ` Karl Hasselström
2007-09-22  8:46   ` [StGit PATCH 0/4] Fix "stg branch --delete" Karl Hasselström
2007-09-22  8:46     ` [StGit PATCH 1/4] Don't special-case the "master" branch during branch delete Karl Hasselström
2007-09-22  8:46     ` [StGit PATCH 2/4] Don't try to delete the branch twice Karl Hasselström
2007-09-22  8:46     ` [StGit PATCH 3/4] Properly remove all config for a deleted branch Karl Hasselström
2007-09-22  8:46     ` Karl Hasselström [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20070922084636.29884.36503.stgit@yoghurt \
    --to=kha@treskal.com \
    --cc=aneesh.kumar@gmail.com \
    --cc=catalin.marinas@gmail.com \
    --cc=git@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).