threads / patch / 7251

patch, 2 partsStGit testcases for new issues

Subject: [PATCH 0/2] StGit testcases for new issues

## tl;dr

3 messages between Mar 14, 2007 and Mar 14, 2007. Diffs are folded; open one to read it.

replies: 2people: 1as markdown or json

Yann Dirson· Mar 14, 2007, 21:34 UTC · lore

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· Mar 14, 2007, 21:34 UTC · re: Yann Dirson · lore

[PATCH 1/2] Demonstrate issue #8733.

Signed-off-by: Yann Dirson <ydirson@altern.org>
---
 t/t1003-branch-delete.sh |   40 ++++++++++++++++++++++++++++++++++++++++
 1 files changed, 40 insertions(+), 0 deletions(-)
Show changes to t/t1003-branch-delete.sh +40 −0
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· Mar 14, 2007, 21:35 UTC · re: Yann Dirson · lore

[PATCH 2/2] Demonstrate issue #8732.

Signed-off-by: Yann Dirson <ydirson@altern.org>
---
 t/t1003-branch-delete.sh |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
Show changes to t/t1003-branch-delete.sh +13 −0
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

← back to recent threads