git-p4: submit test for auto-creating clientPath

Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>

Pete Wyckoff committed Dec 9, 2011 at 18:48 UTC c145225a35c4975ae922b1906ae07c3fb44b7e07
1 file changed +38
t/t9807-submit.sh new
+38
@@ -0,0 +1,38 @@
1 +#!/bin/sh
2 +
3 +test_description='git-p4 submit'
4 +
5 +. ./lib-git-p4.sh
6 +
7 +test_expect_success 'start p4d' '
8 + start_p4d
9 +'
10 +
11 +test_expect_success 'init depot' '
12 + (
13 + cd "$cli" &&
14 + echo file1 >file1 &&
15 + p4 add file1 &&
16 + p4 submit -d "change 1"
17 + )
18 +'
19 +
20 +test_expect_success 'submit with no client dir' '
21 + test_when_finished cleanup_git &&
22 + "$GITP4" clone --dest="$git" //depot &&
23 + (
24 + cd "$git" &&
25 + echo file2 >file2 &&
26 + git add file2 &&
27 + git commit -m "git commit 2" &&
28 + rm -rf "$cli" &&
29 + git config git-p4.skipSubmitEdit true &&
30 + "$GITP4" submit
31 + )
32 +'
33 +
34 +test_expect_success 'kill p4d' '
35 + kill_p4d
36 +'
37 +
38 +test_done