git p4 test: move client_view() function to library
This code will be useful in --detect-branches --use-client-spec tests. Signed-off-by: Pete Wyckoff <pw@padd.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Pete Wyckoff committed
Aug 11, 2012 at 12:55 UTC
d2018293ca604544a79cd9390953ef0272a65078
2 files changed
+17
-17
t/lib-git-p4.sh
+17
@@ -115,3 +115,20 @@ marshal_dump() {
115
EOF
116
"$PYTHON_PATH" "$TRASH_DIRECTORY/marshal-dump.py"
117
}
118
+
119
+#
120
+# Construct a client with this list of View lines
121
+#
122
+client_view() {
123
+ (
124
+ cat <<-EOF &&
125
+ Client: client
126
+ Description: client
127
+ Root: $cli
128
+ View:
129
+ EOF
130
+ for arg ; do
131
+ printf "\t$arg\n"
132
+ done
133
+ ) | p4 client -i
134
+}
t/t9809-git-p4-client-view.sh
-17
@@ -8,23 +8,6 @@ test_expect_success 'start p4d' '
8
start_p4d
9
'
10
11
-#
12
-# Construct a client with this list of View lines
13
-#
14
-client_view() {
15
- (
16
- cat <<-EOF &&
17
- Client: client
18
- Description: client
19
- Root: $cli
20
- View:
21
- EOF
22
- for arg ; do
23
- printf "\t$arg\n"
24
- done
25
- ) | p4 client -i
26
-}
27
-
11
#
12
# Verify these files exist, exactly. Caller creates
13
# a list of files in file "files".