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

[PATCH 2/4] git-p4: submit test for auto-creating clientPath

From
PWPete Wyckoff <pw@padd.com>
Date
Dec 9, 2011, 23:48 UTC
Message-ID
<1323474497-14339-3-git-send-email-pw@padd.com>
In-Reply-To
<1323474497-14339-1-git-send-email-pw@padd.com>
Signed-off-by: Pete Wyckoff <pw@padd.com>
---
 t/t9807-submit.sh |   38 ++++++++++++++++++++++++++++++++++++++
 1 files changed, 38 insertions(+), 0 deletions(-)
 create mode 100755 t/t9807-submit.sh
diff --git a/t/t9807-submit.sh b/t/t9807-submit.sh
new file mode 100755
index 0000000..85ab0d0
--- /dev/null
+++ b/t/t9807-submit.sh
@@ -0,0 +1,38 @@
+#!/bin/sh
+
+test_description='git-p4 submit'
+
+. ./lib-git-p4.sh
+
+test_expect_success 'start p4d' '
+	start_p4d
+'
+
+test_expect_success 'init depot' '
+	(
+		cd "$cli" &&
+		echo file1 >file1 &&
+		p4 add file1 &&
+		p4 submit -d "change 1"
+	)
+'
+
+test_expect_success 'submit with no client dir' '
+	test_when_finished cleanup_git &&
+        "$GITP4" clone --dest="$git" //depot &&
+        (
+                cd "$git" &&
+                echo file2 >file2 &&
+                git add file2 &&
+                git commit -m "git commit 2" &&
+                rm -rf "$cli" &&
+                git config git-p4.skipSubmitEdit true &&
+                "$GITP4" submit
+	)
+'
+
+test_expect_success 'kill p4d' '
+	kill_p4d
+'
+
+test_done
-- 
1.7.8.rc4.42.g8317d
Previous: Pete WyckoffNext: Pete Wyckoff
Message 3 of 6 in “git-p4: paths for p4”
  1. 0/4 git-p4: paths for p4Pete Wyckoff, Dec 9, 2011
  2. 1/4 git-p4: ensure submit clientPath exists before chdirPete Wyckoff, Dec 9, 2011
  3. 2/4 git-p4: submit test for auto-creating clientPathPete Wyckoff, Dec 9, 2011
  4. 3/4 git-p4: use absolute directory for PWD env varPete Wyckoff, Dec 9, 2011
  5. 4/4 git-p4: test for absolute PWD problemPete Wyckoff, Dec 9, 2011
  6. Junio C HamanoDec 12, 2011

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.