# [PATCH 0/2] StGit testcases for new issues

3 messages from 2007-03-14 to 2007-03-14. Participants: Yann Dirson.
Thread: https://gitlist.dev/t/7251

## Yann Dirson, 2007-03-14 21:34

Subject: [PATCH 0/2] StGit testcases for new issues
Message-ID: <20070314213020.13492.24840.stgit@gandelf.nowhere.earth>
URL: https://gitlist.dev/e/20070314213020.13492.24840.stgit%40gandelf.nowhere.earth

```
Here are testcases for the 2 issues involving stack deletion and the
branch that happens to be named "master", that I just reported in the
gna! tracker.

It is probably not a good idea to apply them to stgit's master, but it
could be useful to setup a (rewinding) branch to hold such testcases.
Maybe having testcases readily available would help/encourage people
to step into the project and start to contribute by a bugfix ?

-- 
Yann Dirson    <ydirson@altern.org> |
Debian-related: <dirson@debian.org> |   Support Debian GNU/Linux:
                                    |  Freedom, Power, Stability, Gratis
     http://ydirson.free.fr/        | Check <http://www.debian.org/>

```

## Yann Dirson, 2007-03-14 21:34

Subject: [PATCH 1/2] Demonstrate issue #8733.
Message-ID: <20070314213459.13492.77212.stgit@gandelf.nowhere.earth>
URL: https://gitlist.dev/e/20070314213459.13492.77212.stgit%40gandelf.nowhere.earth
In-Reply-To: <20070314213020.13492.24840.stgit@gandelf.nowhere.earth>

```



Signed-off-by: Yann Dirson <ydirson@altern.org>
---

 t/t1003-branch-delete.sh |   40 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 deletions(-)

diff --git a/t/t1003-branch-delete.sh b/t/t1003-branch-delete.sh
new file mode 100755
index 0000000..8625cc5
--- /dev/null
+++ b/t/t1003-branch-delete.sh
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# Copyright (c) 2006 Catalin Marinas
+#
+
+test_description='Branch deletion.'
+
+. ./test-lib.sh
+
+test_expect_success \
+    'Create a new branch' \
+    '
+    stg branch --create new &&
+    git rev-parse new~0
+    '
+
+test_expect_success \
+    'Delete the new branch' \
+    'stg branch --delete new'
+
+test_expect_failure \
+    'Check the deleted branch is gone' \
+    'git rev-parse new~0'
+
+test_expect_success \
+    'Rename master branch, and create a new branch' \
+    '
+    git branch -m master a &&
+    stg branch --create b
+    '
+
+test_expect_success \
+    'Delete the new branch' \
+    'stg branch --delete b'
+
+test_expect_failure \
+    'Check the deleted branch is gone' \
+    'git rev-parse b~0'
+
+test_done

```

## Yann Dirson, 2007-03-14 21:35

Subject: [PATCH 2/2] Demonstrate issue #8732.
Message-ID: <20070314213504.13492.82355.stgit@gandelf.nowhere.earth>
URL: https://gitlist.dev/e/20070314213504.13492.82355.stgit%40gandelf.nowhere.earth
In-Reply-To: <20070314213020.13492.24840.stgit@gandelf.nowhere.earth>

```



Signed-off-by: Yann Dirson <ydirson@altern.org>
---

 t/t1003-branch-delete.sh |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)

diff --git a/t/t1003-branch-delete.sh b/t/t1003-branch-delete.sh
index 8625cc5..a5c486e 100755
--- a/t/t1003-branch-delete.sh
+++ b/t/t1003-branch-delete.sh
@@ -37,4 +37,17 @@ test_expect_failure \
     'Check the deleted branch is gone' \
     'git rev-parse b~0'
 
+
+test_expect_success \
+    'Create a new stack named "master"' \
+    'stg branch --create master'
+
+test_expect_success \
+    'Delete the "master" branch' \
+    'stg branch --delete master'
+
+test_expect_failure \
+    'Check the deleted "master" branch is gone' \
+    'git rev-parse master~0'
+
 test_done

```
