git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH 3/3] Add testcase for branch -r problem

From
Yann Dirson <ydirson@altern.org>
Date
Apr 12, 2006, 21:21 UTC
Message-ID
<20060412212115.14579.89747.stgit@gandelf.nowhere.earth>
In-Reply-To
<20060412211633.14579.98008.stgit@gandelf.nowhere.earth>
From:  <>
---
 TODO              |    1 +
 t/t1000-branch.sh |   33 +++++++++++++++++++++++++++++++++
 2 files changed, 34 insertions(+), 0 deletions(-)
diff --git a/TODO b/TODO
index a9a8b1f..365ecd4 100644
--- a/TODO
+++ b/TODO
@@ -26,3 +26,4 @@ Bugs:
 
 - the following commands break in subdirs:
   - refresh (ml: "Running StGIT in subdirectories")
+- branch renaming leaves junk behind
diff --git a/t/t1000-branch.sh b/t/t1000-branch.sh
new file mode 100755
index 0000000..4c790f5
--- /dev/null
+++ b/t/t1000-branch.sh
@@ -0,0 +1,33 @@
+#!/bin/sh
+#
+# Copyright (c) 2006 Yann Dirson
+#
+
+test_description='dummy test.
+
+Only to test the testing environment.
+'
+
+. ./test-lib.sh
+
+test_stg_init
+
+test_expect_success \
+    'Create an stgit branch from scratch' \
+    'stg branch -c foo &&
+     stg new p1 -m "p1"
+'
+
+test_expect_failure \
+    'Rename the current stgit branch' \
+    'stg branch -r foo bar
+'
+
+test_expect_success \
+    'Rename an stgit branch' \
+    'stg branch -c buz &&
+     stg branch -r foo bar &&
+     test -z `find .git -name foo`
+'
+
+test_done
Previous: Yann Dirson
Message 4 of 4 in “Add a testsuite to stgit”
  1. 0/3 Add a testsuite to stgitYann Dirson, Apr 12, 2006
  2. 1/3 Add a testsuite framework copied from git-coreYann Dirson, Apr 12, 2006
  3. 2/3 Add list of bugs to TODOYann Dirson, Apr 12, 2006
  4. 3/3 Add testcase for branch -r problemYann Dirson, Apr 12, 2006

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.